O'Reilly logo

Panda3D 1.6 Game Engine by Dave Mathews

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Dissecting task objects

There is one more subject to cover before we're finished with our exploration of tasks, and that is the task object itself. Every method we created as a task so far was set to accept a variable called task. The task manager passes a task object into that variable.

Honestly, we don't need to interact with the task object very often. For the most part, it just supplies us with extra information about the task. We access that information by using the following attributes of the task object:

  • task.time returns a float that tells us how much time has passed since the first time the task was executed. This float continues to increase even when the task isn't being executed.
  • task.frame returns an integer that tells us how many frames ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required