Vizard 8 » Command Index » Vizard modules » viztask » <viztask:Condition>.reset
8.0

<viztask:Condition>.reset

Reset the condition

<viztask:Condition>.reset()  

Remarks

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.

Return Value

None

Example

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()