コード例 #1
0
 public override void PursuerCollisionEnter(Pursuer pursuer)
 {
     if (CurrentState == State.Normal)
     {
         SetState(State.Destroyed);
         pursuer.HitObstacle();
     }
 }
コード例 #2
0
        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
ファイル: Cell.cs プロジェクト: LeonMalakov/Road-Works-Demo
 public virtual void PursuerCollisionEnter(Pursuer pursuer)
 {
 }
コード例 #4
0
 private void Awake()
 {
     // Required component.
     _pursuer = GetComponent <Pursuer>();
 }