Переглянути джерело

删除没有用的行军时攻击特效

WGL 4 місяців тому
батько
коміт
65d90367ae

+ 0 - 21
ActionTowerDefense/Assets/Scripts/Characters/AttackController.cs

@@ -269,12 +269,6 @@ public class AttackController : MonoBehaviour
     [DisplayOnly]
     public SpecialSkills skill;
     [DisplayOnly]
-    public GameObject attackEffect;
-    [DisplayOnly]
-    public Dictionary<string, GameObject> effects;
-    [DisplayOnly]
-    public GameObject effect;
-    [DisplayOnly]
     public float attackDistance;
 
     [Header("¹¥»÷·¶Î§")]
@@ -315,7 +309,6 @@ public class AttackController : MonoBehaviour
             attackInfo = attackMethod[0].attackInfo;
             curDamage = attackInfo.damage;
         }
-        effects = new Dictionary<string, GameObject>();
         for (int i = 0; i < attackMethod.Length; i++)
         {
             if (attackMethod[i].needToChange)
@@ -428,20 +421,6 @@ public class AttackController : MonoBehaviour
 
     public virtual void Attack_march(int id)
     {
-        if (attackEffect != null)
-        {
-            if (effects.ContainsKey(attackEffect.name))
-            {
-                effect = effects[attackEffect.name];
-                effect.SetActive(true);
-            }
-            else
-            {
-                effects[attackEffect.name] = Instantiate(attackEffect, owner.bodyTrans);
-                effect = effects[attackEffect.name];
-                effect.SetActive(true);
-            }
-        }
         Vector3 leftDir = owner.GetMoveDir();
         if (leftDir.x > 0.3f)
         {

+ 0 - 4
ActionTowerDefense/Assets/Scripts/Characters/Demonic.cs

@@ -667,10 +667,6 @@ public class Demonic : MoveCharacter
                 {
                     rb.constraints = RigidbodyConstraints.FreezePositionZ | RigidbodyConstraints.FreezeRotation;
                 }
-                if (attackController.effect)
-                {
-                    attackController.effect.SetActive(false);
-                }
                 attackController.ChooseAttack(curAttackID);
                 attackController.isAttackTriggerOn = false;
                 attackController.attackTrigger.gameObject.SetActive(false);