Override this function to perform any data initialization for your custom Condition object.
This function will be called immediately after a Condition is yielded by a task.
import viztask
class waitTime(viztask.Condition):
"""Wait for specified number of seconds to elapse"""
def __init__(self,seconds):
self.__seconds = seconds
def reset(self):
self.__end = viz.getFrameTime() + self.__seconds
def update(self):
return self.__end <= viz.getFrameTime()