using UnityEngine; using System.Collections; public class CDscript : MonoBehaviour { public bool pause = false; public float startCount = 5.0f; // Use this for initialization void Start () { Time.timeScale = 0; startCount -= Time.deltaTime; pause = true; } // Update is called once per frame void Update () { if (startCount >=1.0f){ Debug.Log ("cd"); } if (startCount <=0){ pause = false; } if (pause = false){ Time.timeScale = 1; } } }