Advertisement
Guest User

Untitled

a guest
Jan 24th, 2017
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. using UnityEngine;
  2. using System.Collections;
  3.  
  4. public class GameControl : MonoBehaviour {
  5.  
  6. public static GameControl instance;
  7. public GameObject gameOverText;
  8. public bool gameOver = false;
  9. public float scrollSpeed = -1.5f;
  10.  
  11. // Use this for initialization
  12. void Awake ()
  13. {
  14. if (instance == null)
  15. {
  16. instance = this;
  17. } else if (instance != this)
  18. {
  19. Destroy(gameObject);
  20. }
  21. }
  22.  
  23. // Update is called once per frame
  24. void Update () {
  25.  
  26. }
  27.  
  28. public void BirdDied()
  29. {
  30. gameOverText.SetActive(true);
  31. gameOver = true;
  32. }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement