Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.SceneManagement;
- public class Respawn : MonoBehaviour
- {
- public float timeLeft = 30.0f;
- void Update()
- {
- timeLeft -= Time.deltaTime;
- if (timeLeft < 0)
- {
- GameOver();
- }
- }
- private void GameOver()
- {
- SceneManager.LoadScene("GameOver");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement