PlayerSpawn.Update C# (CSharp) Method

Update() public method

public Update ( ) : void
return void
    void Update()
    {
        //if the player is die
        if(playerObject == null && lives > 0)
        {
            // this will count down one second after one second player will respawn
            respawnTime -= Time.deltaTime;
            if(respawnTime <= 0)
            {
                respawnPlayer();

            }

        }
    }

Usage Example

Exemplo n.º 1
0
 void Update()
 {
     if ((Ship.Update() || Item.Update()) && Player.Update())
     {
         enabled = false;
     }
     ShipSound.Update();
 }