예제 #1
0
 void OnTriggerEnter(Collider other)
 {
     if (other.tag == "Boundary")
     {
         return;
     }
     Instantiate(explosion, transform.position, transform.rotation);
     if (other.tag == "Player")
     {
         Instantiate(playerExplosion, other.transform.position, other.transform.rotation);
         gameConroller.GameOver();
     }
     gameConroller.AddScore(score);
     Destroy(other.gameObject);
     Destroy(gameObject);
 }
예제 #2
0
 private void OnMouseDown()
 {
     if (_gameCon.IsGameOver)
     {
         return;
     }
     if (_gameCon == null || !Availible)
     {
         return;
     }
     Select(true);
     if (_gameCon.CheckWinState())
     {
         _gameCon.GameOver();
         return;
     }
     _gameCon.MakeAIturn();
 }