Example #1
0
 void OnTriggerStay(Collider other)
 {
     if (other.gameObject.tag == ObjectToDestroyTagName && Input.GetMouseButtonUp(0))
     {
         ScoreBoard scoreBoard = GameMaster.GetScoreBoard();
         if (scoreBoard != null)
         {
             scoreBoard.CountDestroy(other.gameObject);
         }
         Destroy(other.gameObject);
     }
 }