I tried to understand the WaitForSeconds method trough the documentation and afterwards by looking here trough many questions but I still can't get it to work.
My setup is as follows:
But It doesn't work, the game doesn't wait as if the function is not called. How exactly would I need to set it up so it will work?
If anyone can help me further with this I would appreciate it.
asked May 27 '11 at 06:34 PM
When you call use StartCoroutine without yielding, then it won't wait for the coroutine to finish, it will just launch the coroutine and continue on with the other instructions. There's no point to your WaitASec function, since it just calls WaitForSeconds and nothing else. You should remove that function, and just use yield WaitForSeconds directly in your FlipCardFaceUp function, which should be a coroutine.
answered May 27 '11 at 06:45 PM