private IEnumerator Countdown() { var duration = RespawnTime; while (duration != -1) { ScriptableTextDisplay.InitializeScriptableText(4, Vector3.zero, "Respawn in " + duration.ToString("F0")); yield return(new WaitForSeconds(1)); duration--; if (duration == 0) { SpawnEvents.RespawnRandomSpawnNode(PhotonNetwork.LocalPlayer); } } }
public override void SpawnPlayer(Player player) { SpawnEvents.RespawnRandomSpawnNode(player); }