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.
 
 
 
 
 

42 lines
704 B

using UnityEngine;
using System.Collections;
public class CDscript : MonoBehaviour {
public bool pause = true;
public float startCount = 5.0f;
// Use this for initialization
void Start () {
pause = true;
}
// Update is called once per frame
void Update () {
if (pause){
startCount -= Time.unscaledDeltaTime;
Time.timeScale = 0;
Debug.Log ("cd");
}
/*if (startCount >=4.0f && <4.9f){
}
if (startCount >=3.0f && <3.9f){
}
if (startCount >=2.0f && <2.9f){
}
if (startCount >=1.0f && <1.9f){
}
if (startCount >=0.0f && <0.9f){
}*/
if (startCount <=0){
pause = false;
Time.timeScale = 1;
startCount = startCount + 5.0f;
}
}
}