Skip to main content
deleted 9 characters in body
Source Link
return true
  • 942
  • 5
  • 18

Coroutines are you friend I think on this one, I think...

http://docs.unity3d.com/Manual/Coroutines.html

Here is an example:

void Start () {
    StartCoroutine ("Countdown", 10);
}

private IEnumerator Countdown(int time){
    while(time>0){
        Debug.Log(time--);
        yield return new WaitForSeconds(1);
    }
    Debug.Log("Countdown Complete!");
}

Coroutines are you friend I think on this one, I think...

http://docs.unity3d.com/Manual/Coroutines.html

Here is an example:

void Start () {
    StartCoroutine ("Countdown", 10);
}

private IEnumerator Countdown(int time){
    while(time>0){
        Debug.Log(time--);
        yield return new WaitForSeconds(1);
    }
    Debug.Log("Countdown Complete!");
}

Coroutines are you friend I think on this one...

http://docs.unity3d.com/Manual/Coroutines.html

Here is an example:

void Start () {
    StartCoroutine ("Countdown", 10);
}

private IEnumerator Countdown(int time){
    while(time>0){
        Debug.Log(time--);
        yield return new WaitForSeconds(1);
    }
    Debug.Log("Countdown Complete!");
}
edited body
Source Link
return true
  • 942
  • 5
  • 18

Coroutines are you friend I think on this one, I think...

http://docs.unity3d.com/Manual/Coroutines.html

Here is an example:

void Start () {
    StartCoroutine ("Countdown", 10);
}

private IEnumerator Countdown(int time){
    while(time>1time>0){
        Debug.Log(time--time);
        yield return new WaitForSeconds(1);
    }
    Debug.Log("Countdown Complete!");
}

Coroutines are you friend I think on this one, I think...

http://docs.unity3d.com/Manual/Coroutines.html

Here is an example:

void Start () {
    StartCoroutine ("Countdown", 10);
}

private IEnumerator Countdown(int time){
    while(time>1){
        Debug.Log(--time);
        yield return new WaitForSeconds(1);
    }
    Debug.Log("Countdown Complete!");
}

Coroutines are you friend I think on this one, I think...

http://docs.unity3d.com/Manual/Coroutines.html

Here is an example:

void Start () {
    StartCoroutine ("Countdown", 10);
}

private IEnumerator Countdown(int time){
    while(time>0){
        Debug.Log(time--);
        yield return new WaitForSeconds(1);
    }
    Debug.Log("Countdown Complete!");
}
Source Link
return true
  • 942
  • 5
  • 18

Coroutines are you friend I think on this one, I think...

http://docs.unity3d.com/Manual/Coroutines.html

Here is an example:

void Start () {
    StartCoroutine ("Countdown", 10);
}

private IEnumerator Countdown(int time){
    while(time>1){
        Debug.Log(--time);
        yield return new WaitForSeconds(1);
    }
    Debug.Log("Countdown Complete!");
}