Inheritance: UnityEngine.MonoBehaviour
Beispiel #1
0
 // I don't think this will ever be used, at least not while the colliders are set up as they are.
 public void attack(Actor target)
 {
     target.TakeDamage(attackStrength);
 }
Beispiel #2
0
 bool IsOpponent(Actor other)
 {
     return this.GetType() != other.GetType();
 }
Beispiel #3
0
 bool IsValidAttack(Actor other)
 {
     return other && IsOpponent(other) && other.attacking;
 }
Beispiel #4
0
 void Start()
 {
     enemy = Instantiate<GameObject>(enemy);
     enemy.transform.position = transform.position;
     actor = enemy.GetComponent<Actor>();
 }