-
Book Overview & Buying
-
Table Of Contents
Panda3D 1.6 Game Engine Beginner's Guide
By :
So far, all of our tasks have used the same return statement, return task.cont. This isn't our only option, though. In reality, we have three options to choose from:
task.cont is our first option. Using this return value tells the task to execute again next frame. This option is intended for tasks that continue without interruption.
task.again is our second option. This option is meant for use with doMethodLater. If we use this return value, the task will execute again after the delay that's provided to doMethodLater. This means that if we have a one second delay in doMethodLater and we use return task.again, the task will execute once every second.
task.done is the last return value. This tells the task to remove itself from the task manager and stop executing. We can use task.done with a doMethodLater to perform an action once after a delay, or we could use task.done to stop a task that is no longer needed. Returning task.done is the same as returning nothing...
Change the font size
Change margin width
Change background colour