Code: Select all
import gamethread
gamethread.delayed(delay_time, myCallback(args*))
Code: Select all
import gamethread
gamethread.delayed(delay_time, myCallback(args*))
Code: Select all
import gamethread
gamethread.delayed(delay_time, myCallback, args)
Code: Select all
from tick.delays import TickDelays
TickDelays.delay(delay_time, myCallback, *args)
Code: Select all
TickDelays.cancel_delay(<instance>)
satoon101 wrote:Also, if you store the instance returned by TickDelays.delay, you can cancel it with:Code: Select all
TickDelays.cancel_delay(<instance>)
Code: Select all
myDelay = TickDelays.delay(delay_time, callBack)
TickDelays.cancel_delay(myDelay)
Code: Select all
myDelay = TickDelays.delay(delay_time, callBack)
myDelay.cancel_delay()
#Or
myDelay.cancel()
satoon101 wrote:I originally thought about adding this, but never did. I cannot remember why I decided not to, though. It would be very easy to add in.
Also, TickDelays is a dictionary object, so it is just as logical to use the current implementation. And, if we were to add in <instance>.cancel_delay(), we would still keep TickDelays.cancel_delay(<instance>).
Return to “General Discussion”
Users browsing this forum: No registered users and 56 guests