public override void PursuerCollisionEnter(Pursuer pursuer)
 {
     if (CurrentState == State.Normal)
     {
         SetState(State.Destroyed);
         pursuer.HitObstacle();
     }
 }
        private void OnTriggerEnter(Collider other)
        {
            PlayerCharacter player = other.GetComponent <PlayerCharacter>();

            if (player != null)
            {
                _cell.PlayerCollisionEnter(player);
                return;
            }

            Pursuer pursuer = other.GetComponent <Pursuer>();

            if (pursuer != null)
            {
                _cell.PursuerCollisionEnter(pursuer);
                return;
            }
        }
Example #3
0
 public virtual void PursuerCollisionEnter(Pursuer pursuer)
 {
 }
 private void Awake()
 {
     // Required component.
     _pursuer = GetComponent <Pursuer>();
 }