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