Przeglądaj źródła

英灵刺客普攻加攻击特效

LAPTOP-OM1V99U2\永远de小亡灵 1 rok temu
rodzic
commit
8649d8e65d

+ 4 - 1
ActionTowerDefense/Assets/Resources/Prefab/Spirits_Assassin.prefab

@@ -217,7 +217,7 @@ MonoBehaviour:
   totalAttack1Time: 1.25
   totalAttack2Time: 1.8
   isDie: 0
-  totalHp: 200
+  totalHp: 400
   hp: 0
   attack1Infos:
   - damage: 50
@@ -269,6 +269,7 @@ MonoBehaviour:
   maxRotateSpeed: 0
   minRotateSpeed: 0
   floatTime: 20
+  outlineMats: []
   id: 0
   costMp: 100
   searchState: 0
@@ -615,6 +616,8 @@ MonoBehaviour:
   force: {x: 0, y: 0, z: 0}
   changeHurt: 0
   repelValue: 0
+  spiritsAttackEffect: {fileID: 7473170563405908938, guid: 8ad3c225050205945b10657aa300afd6, type: 3}
+  offsetY: 1
 --- !u!1 &7669620205589286043
 GameObject:
   m_ObjectHideFlags: 0

+ 5 - 1
ActionTowerDefense/Assets/Scripts/AttackTrigger.cs

@@ -11,7 +11,8 @@ public class AttackTrigger : MonoBehaviour
     public Vector3 force;
     public bool changeHurt;
     public float repelValue;
-
+    public GameObject spiritsAttackEffect;
+    public int offsetY = 1;
     private void Awake()
     {
         owner = GetComponentInParent<Character>();
@@ -38,6 +39,9 @@ public class AttackTrigger : MonoBehaviour
                 {
                     print("BeHit");
                     hitTrigger.BeHit(damage, force, changeHurt, repelValue);
+                    GameObject effect = Instantiate(spiritsAttackEffect);
+                    effect.transform.position = new Vector3(hitTrigger.transform.position.x,
+                        transform.position.y + offsetY, 0);
                 }
             }
         }

+ 1 - 0
ActionTowerDefense/Assets/Scripts/Demonic.cs

@@ -410,6 +410,7 @@ public class Demonic : MoveCharacter
                 aniCollider.Play("Rise", 0, 0);
                 break;
             case CharacterState.Fall:
+                ani.Play("fall", 0, 0);
                 aniCollider.Play("Fall", 0, 0);
                 //animalAni.SetInteger("state", (int)PlayerState.Fall);
                 break;