I have the following code:
....
StartCoroutine (DealTheCards ());
}
IEnumerator DealTheCards() {
int theLoop = 52;
while (theLoop > 0) {
yield return new WaitForSeconds (rateToDealSeconds);
print ("theLoop: " + theLoop);
theLoop--;
}
}
I get:
CS0120: An object reference is required to access non-static member `UnityEngine.MonoBehaviour.StartCoroutine(System.Collections.IEnumerator)'
Could someone nice explain to me what the problem is?