Exemplo n.º 1
0
 public void OnTriggerEnter2D(Collider2D other)
 {
     if (other.tag == "Player")
     {
         mob = gameObject.GetComponentInParent<MobMotor>();
         mob.wherePlayer = direction;
     }
 }
Exemplo n.º 2
0
 public void OnTriggerExit2D(Collider2D other)
 {
     if (other.tag == "Player")
     {
         mob = gameObject.GetComponentInParent<MobMotor>();
         mob.wherePlayer = MobMotor.AttackDirection.None;
     }
 }
Exemplo n.º 3
0
 protected virtual void Awake()
 {
     motor = GetComponent <MobMotor>();
 }