예제 #1
0
 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;
            }
        }
예제 #3
0
 public virtual void PursuerCollisionEnter(Pursuer pursuer)
 {
 }
 private void Awake()
 {
     // Required component.
     _pursuer = GetComponent <Pursuer>();
 }