- Home /
Pause between user mouse clicks
I'm trying to make a grid turn based game and I want the user to be able to click on the grid, then have a pause function that does not let them click anywhere for 2 seconds or so then after this duration they can make another move. I've tried disabling the colliders on the grid I am using in the on mouse down event, then reenabling them using both Coroutine and invokerepeating with no luck. Is there a correct general way of either disabling clicking on screen or some other way of doing what I am intending?
Thanks!
Answer by TEEBQNE · Apr 04, 2017 at 08:15 AM
I fixed the issue. It was due to the fact that the function I was calling startCoroutine in was in update. I just had to add a boolean while loop to IEnumerator and call WaitForSeconds immediately in the loop. Sorry for the confusing title/context.
Your answer
Follow this Question
Related Questions
Pause GameLoop with Pause Button 1 Answer
Invoking does not work, but why? 1 Answer
InvokeRepeating with parameters 2 Answers
I don't understand coroutines and invoke 1 Answer
convert timer from update() to coroutine or invokerepeating 0 Answers