Esempio n. 1
0
 void Update()
 {
     if (controlTimer > 0)
     {
         controlTimer -= Time.deltaTime;
     }
     else if (dead)
     {
         if (Input.GetButtonDown("Respawn"))
         {
             manager.Reload();
             transform.position  = startPos;
             player.render       = true;
             player.controllable = true;
             player.Freeze();
             dead = false;
             GameObject.FindObjectOfType <UIHandler>().UnDead();
         }
     }
     else if (!player.controllable)
     {
         player.controllable = true;
     }
 }