You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
488 B

  1. using UnityEngine;
  2. using System.Collections;
  3. public class CDscript : MonoBehaviour {
  4. public bool pause = false;
  5. public float startCount = 5.0f;
  6. // Use this for initialization
  7. void Start () {
  8. Time.timeScale = 0;
  9. startCount -= Time.deltaTime;
  10. pause = true;
  11. }
  12. // Update is called once per frame
  13. void Update () {
  14. if (startCount >=1.0f){
  15. Debug.Log ("cd");
  16. }
  17. if (startCount <=0){
  18. pause = false;
  19. }
  20. if (pause = false){
  21. Time.timeScale = 1;
  22. }
  23. }
  24. }