Ejemplo n.º 1
0
 public void SpawnCrusher()
 {
     if (GameManager.Instance.Data.Lives.Value > 0)
     {
         Crusher = Instantiate(_crusherPrefab, _crusherSpawnPoint, Quaternion.identity);
         _destroyables.Add(Crusher);
     }
 }
Ejemplo n.º 2
0
 private static void DestroyCrusher(Crusher crusher)
 {
     GameManager.Instance.Data.ChangeLives(-1);
     Destroy(crusher.gameObject);
     //play sound
     SoundManager.Instance.PlayLiveLoose();
     //play fx
 }