Example #1
0
 public void EnemyDead()
 {
     dead = true;
     Dead.SetActive(true);
     if (children == 0)
     {
         GameClear();
     }
 }
Example #2
0
    public void RespawnPlayer()
    {
        Lebensanzeige   = Lebensanzeige - 1;
        Lebenstext.text = Lebensanzeige.ToString();

        bool leben = Lebensanzeige > 0;

        switch (leben)
        {
        case true:
            Spieler.transform.position = speicherpunkt.transform.position;
            break;

        case false:
            Time.timeScale = 0.0f;
            Debug.Log("Game over");
            Dead.SetActive(true);
            break;

        default:
            break;
        }
    }