Пример #1
0
 private void OnCollisionEnter(Collision collision)
 {
     if (collision.gameObject.tag == tag1)
     {
         BlockSpawner.count--;
         Destroy(collision.gameObject);
         Destroy(this.gameObject);
         if (BlockSpawner.count == 0)
         {
             BlockSpawner.InvokeRestart();
         }
     }
     if (collision.gameObject.tag == tag2)
     {
         BlockSpawner.InvokeRetry();
         collision.gameObject.SetActive(false);
         Destroy(this.gameObject);
     }
 }