Inheritance: UnityEngine.MonoBehaviour
コード例 #1
0
ファイル: Actor.cs プロジェクト: lmucs/Coliseo
 // 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);
 }
コード例 #2
0
ファイル: Actor.cs プロジェクト: lmucs/Coliseo
 bool IsOpponent(Actor other)
 {
     return this.GetType() != other.GetType();
 }
コード例 #3
0
ファイル: Actor.cs プロジェクト: lmucs/Coliseo
 bool IsValidAttack(Actor other)
 {
     return other && IsOpponent(other) && other.attacking;
 }
コード例 #4
0
ファイル: Spawn.cs プロジェクト: lmucs/Coliseo
 void Start()
 {
     enemy = Instantiate<GameObject>(enemy);
     enemy.transform.position = transform.position;
     actor = enemy.GetComponent<Actor>();
 }