PythonTask
from panda3d.core import PythonTask
- class PythonTask
Bases:
AsyncTask
This class exists to allow association of a Python function or coroutine with the AsyncTaskManager.
Inheritance diagram
- __init__(*args, **kwargs)
- again = 2
- cont = 1
- delayTime
Alias of delay_time.
- delay_time
The delay value that has been set on this task, if any, or None.
- exit = 4
- frame
The number of frames that have elapsed since the task was started, according to the task manager’s clock.
- getArgs()
C++ Interface: get_args(const PythonTask self)
- getClassType()
C++ Interface: get_class_type()
- getFunction()
C++ Interface: get_function(const PythonTask self)
- /**
Returns the function that is called when the task runs.
*/
- getOwner()
C++ Interface: get_owner(PythonTask self)
- /**
Returns the “owner” object. See set_owner().
*/
- getUponDeath()
C++ Interface: get_upon_death(const PythonTask self)
- /**
Returns the function that is called when the task finishes.
*/
- get_args()
C++ Interface: get_args(const PythonTask self)
- get_class_type()
C++ Interface: get_class_type()
- get_function()
C++ Interface: get_function(const PythonTask self)
- /**
Returns the function that is called when the task runs.
*/
- get_owner()
C++ Interface: get_owner(PythonTask self)
- /**
Returns the “owner” object. See set_owner().
*/
- get_upon_death()
C++ Interface: get_upon_death(const PythonTask self)
- /**
Returns the function that is called when the task finishes.
*/
- loop(*taskList: AsyncTask) AsyncTaskSequence
- pause
alias of
AsyncTaskPause
- pickup = 3
- sequence(*taskList: AsyncTask) AsyncTaskSequence
- setArgs()
C++ Interface: set_args(const PythonTask self, object args, bool append_task)
- setFunction()
C++ Interface: set_function(const PythonTask self, object function)
- setOwner()
C++ Interface: set_owner(const PythonTask self, object owner)
- setResult()
C++ Interface: set_result(const PythonTask self, object result)
- /**
Sets the “result” of this task. This is the value returned from an “await”
expression on this task.
This can only be called while the task is still alive.
*/
- setUponDeath()
C++ Interface: set_upon_death(const PythonTask self, object upon_death)
- set_args()
C++ Interface: set_args(const PythonTask self, object args, bool append_task)
- set_function()
C++ Interface: set_function(const PythonTask self, object function)
- set_owner()
C++ Interface: set_owner(const PythonTask self, object owner)
- set_result()
C++ Interface: set_result(const PythonTask self, object result)
- /**
Sets the “result” of this task. This is the value returned from an “await”
expression on this task.
This can only be called while the task is still alive.
*/
- set_upon_death()
C++ Interface: set_upon_death(const PythonTask self, object upon_death)
- time
The amount of seconds that have elapsed since the task was started, according to the task manager’s clock.
- wakeTime
Alias of wake_time.
- wake_time
If this task has been added to an AsyncTaskManager with a delay in effect, this contains the time at which the task is expected to awaken. It has no meaning of the task has not yet been added to a queue, or if there was no delay in effect at the time the task was added. If the task’s status is not S_sleeping, this contains 0.0.