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); }
private void OnMouseDown() { if (_gameCon.IsGameOver) { return; } if (_gameCon == null || !Availible) { return; } Select(true); if (_gameCon.CheckWinState()) { _gameCon.GameOver(); return; } _gameCon.MakeAIturn(); }