Kaynağa Gözat

激光collider和砖头掉魂bug

SZAND\msx_2 1 yıl önce
ebeveyn
işleme
8549b90433

+ 2 - 1
ActionTowerDefense/Assets/Scripts/Boss/YuMenGuan/Block.cs

@@ -20,6 +20,7 @@ public class Block : Character
     [Header("ÊôÐÔ")]
     public YuMenGuan ymg;
     public bool isSpecial;
+    public bool isSpecialDie;
 
     [Header("µôÂä»ê")]
     public GameObject soulPrefab;
@@ -122,7 +123,7 @@ public class Block : Character
                 dieKeepTime -= Time.deltaTime;
                 if (!isDie && dieKeepTime <= 0)
                 {
-                    if (curBomb != null)
+                    if (curBomb != null || isSpecialDie)
                     {
                         DropSouls();
                     }

+ 5 - 3
ActionTowerDefense/Assets/Scripts/Boss/YuMenGuan/EyeLaser.cs

@@ -36,6 +36,7 @@ public class EyeLaser : MonoBehaviour
 
     [Header("´óС")]
     private List<int> shaderIDs = new List<int>();
+    private float bossScale;
 
     [Header("¾¯Ê¾")]
     public GameObject tip;
@@ -109,6 +110,7 @@ public class EyeLaser : MonoBehaviour
 
     private void ChangeCol()
     {
+        bossScale = ymg.gameObject.transform.localScale.x;
         col.gameObject.SetActive(true);
         col1.gameObject.SetActive(true);
         col2.gameObject.SetActive(true);
@@ -121,9 +123,9 @@ public class EyeLaser : MonoBehaviour
         ls.x = Vector2.Distance(headPos.position, TranEnd(0));
         ls1.x = Vector2.Distance(headPos.position, TranEnd(1));
         ls2.x = Vector2.Distance(headPos.position, TranEnd(2));
-        col.localScale = ls;
-        col1.localScale = ls1;
-        col2.localScale = ls2;
+        col.localScale = ls / bossScale;
+        col1.localScale = ls1 / bossScale;
+        col2.localScale = ls2 / bossScale;
         Vector3 left = headPos.position - TranEnd(0);
         Vector3 left1 = headPos.position - TranEnd(1);
         Vector3 left2 = headPos.position - TranEnd(2);

+ 1 - 0
ActionTowerDefense/Assets/Scripts/Boss/YuMenGuan/YuMenGuan.cs

@@ -412,6 +412,7 @@ public class YuMenGuan : Boss
         {
             if (!bl.isDie)
             {
+                bl.isSpecialDie = true;
                 bl.ChangeAttackState(Block.State.drop);
             }
         }

+ 1 - 1
ActionTowerDefense/Assets/material/line.mat

@@ -43,7 +43,7 @@ Material:
     - _MainTex:
         m_Texture: {fileID: 2800000, guid: 53e9fd48a689b264d9a7741adfe8e9b2, type: 3}
         m_Scale: {x: 1, y: 1}
-        m_Offset: {x: -3043.5063, y: 0}
+        m_Offset: {x: -3585.819, y: 0}
     - _MetallicGlossMap:
         m_Texture: {fileID: 0}
         m_Scale: {x: 1, y: 1}

+ 1 - 1
ActionTowerDefense/Assets/material/line_air.mat

@@ -43,7 +43,7 @@ Material:
     - _MainTex:
         m_Texture: {fileID: 2800000, guid: c8aeee0a826afe14a8bc88cc6309b437, type: 3}
         m_Scale: {x: 1, y: 1}
-        m_Offset: {x: -2640.3918, y: 0}
+        m_Offset: {x: -3456.6106, y: 0}
     - _MetallicGlossMap:
         m_Texture: {fileID: 0}
         m_Scale: {x: 1, y: 1}

+ 1 - 1
ActionTowerDefense/Assets/material/line_back.mat

@@ -43,7 +43,7 @@ Material:
     - _MainTex:
         m_Texture: {fileID: 2800000, guid: f3e88fd2fe21e374582525302db1f9ec, type: 3}
         m_Scale: {x: 1, y: 1}
-        m_Offset: {x: -2559.7534, y: 0}
+        m_Offset: {x: -3064.328, y: 0}
     - _MetallicGlossMap:
         m_Texture: {fileID: 0}
         m_Scale: {x: 1, y: 1}