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.

41 lines
704 B

  1. using UnityEngine;
  2. using System.Collections;
  3. public class CDscript : MonoBehaviour {
  4. public bool pause = true;
  5. public float startCount = 5.0f;
  6. // Use this for initialization
  7. void Start () {
  8. pause = true;
  9. }
  10. // Update is called once per frame
  11. void Update () {
  12. if (pause){
  13. startCount -= Time.unscaledDeltaTime;
  14. Time.timeScale = 0;
  15. Debug.Log ("cd");
  16. }
  17. /*if (startCount >=4.0f && <4.9f){
  18. }
  19. if (startCount >=3.0f && <3.9f){
  20. }
  21. if (startCount >=2.0f && <2.9f){
  22. }
  23. if (startCount >=1.0f && <1.9f){
  24. }
  25. if (startCount >=0.0f && <0.9f){
  26. }*/
  27. if (startCount <=0){
  28. pause = false;
  29. Time.timeScale = 1;
  30. startCount = startCount + 5.0f;
  31. }
  32. }
  33. }