Panda3D

Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | List of all members
State Class Reference
Inheritance diagram for State:

## Public Member Functions
| __init__ (self, name, enterFunc=None, exitFunc=None, transitions=Any, inspectorPos=[])
| __str__ (self)
| addChild (self, ClassicFSM)
| addTransition (self, transition)
| enter (self, argList=[])
| exit (self, argList=[])
| getChildren (self)
| getEnterFunc (self)
| getExitFunc (self)
| getInspectorPos (self)
| getName (self)
| getTransitions (self)
| hasChildren (self)
| isTransitionDefined (self, otherState)
| removeChild (self, ClassicFSM)
| replaceMethod (self, oldFunction, newFunction)
| setChildren (self, FSMList)
| setEnterFunc (self, stateEnterFunc)
| setExitFunc (self, stateExitFunc)
| setInspectorPos (self, inspectorPos)
| setName (self, stateName)
| setTransitions (self, stateTransitions)
| transitionsToAny (self)
Public Member Functions inherited from DirectObject
| __init__ (self)
| accept (self, event, method, extraArgs=[])
| acceptOnce (self, event, method, extraArgs=[])
| addTask (self, *args, **kwargs)
| detectLeaks (self)
| doMethodLater (self, *args, **kwargs)
| getAllAccepting (self)
| ignore (self, event)
| ignoreAll (self)
| isAccepting (self, event)
| isIgnoring (self, event)
| removeAllTasks (self)
| removeTask (self, taskOrName)

## Static Public Attributes
str | Any = 'ANY'
| notify = directNotify.newCategory("State")
| States = weakref.WeakKeyDictionary()
Static Public Attributes inherited from DirectObject
| accept_once = acceptOnce
| add_task = addTask
| detect_leaks = detectLeaks
| do_method_later = doMethodLater
| get_all_accepting = getAllAccepting
| ignore_all = ignoreAll
| is_accepting = isAccepting
| is_ignoring = isIgnoring
| remove_all_tasks = removeAllTasks
| remove_task = removeTask

## Additional Inherited Members
Protected Member Functions inherited from DirectObject
| _addTask (self, task)
| _clearTask (self, task)
Protected Attributes inherited from DirectObject
dict | _taskList = {}

## Constructor & Destructor Documentation

## ◆ __init__()

__init__ | ( |  | self,
|  |  | name,
|  |  | enterFunc = None,
|  |  | exitFunc = None,
|  |  | transitions = Any,
|  |  | inspectorPos = [] )

    __init__(self, string, func, func, string[], inspectorPos = [])
    State constructor: takes name, enter func, exit func, and
    a list of states it can transition to (or State.Any).

## Member Function Documentation

## ◆ __str__()

__str__ | ( |  | self | ) |

## ◆ addChild()

addChild | ( |  | self,
|  |  | ClassicFSM )

    Add the given ClassicFSM to list of child FSMs

## ◆ addTransition()

addTransition | ( |  | self,
|  |  | transition )

    addTransitions(self, string)

## ◆ enter()

enter | ( |  | self,
|  |  | argList = [] )

    Call the enter function for this state

## ◆ exit()

exit | ( |  | self,
|  |  | argList = [] )

    Call the exit function for this state

## ◆ getChildren()

getChildren | ( |  | self | ) |

    Return the list of child FSMs

## ◆ getEnterFunc()

getEnterFunc | ( |  | self | ) |

## ◆ getExitFunc()

getExitFunc | ( |  | self | ) |

## ◆ getInspectorPos()

getInspectorPos | ( |  | self | ) |

    getInspectorPos(self)

## ◆ getName()

getName | ( |  | self | ) |

## ◆ getTransitions()

getTransitions | ( |  | self | ) |

    warning -- if the state transitions to any other state,
    returns an empty list (falsely implying that the state
    has no transitions)
    see State.transitionsToAny()

## ◆ hasChildren()

hasChildren | ( |  | self | ) |

    Return true if state has child FSMs

## ◆ isTransitionDefined()

isTransitionDefined | ( |  | self,
|  |  | otherState )

## ◆ removeChild()

removeChild | ( |  | self,
|  |  | ClassicFSM )

    Remove the given ClassicFSM from list of child FSMs

## ◆ replaceMethod()

replaceMethod | ( |  | self,
|  |  | oldFunction,
|  |  | newFunction )

## ◆ setChildren()

setChildren | ( |  | self,
|  |  | FSMList )

    setChildren(self, ClassicFSM[])
    Set the children to given list of FSMs

## ◆ setEnterFunc()

setEnterFunc | ( |  | self,
|  |  | stateEnterFunc )

## ◆ setExitFunc()

setExitFunc | ( |  | self,
|  |  | stateExitFunc )

## ◆ setInspectorPos()

setInspectorPos | ( |  | self,
|  |  | inspectorPos )

    setInspectorPos(self, [x, y])

## ◆ setName()

setName | ( |  | self,
|  |  | stateName )

## ◆ setTransitions()

setTransitions | ( |  | self,
|  |  | stateTransitions )

    setTransitions(self, string[])

## ◆ transitionsToAny()

transitionsToAny | ( |  | self | ) |

     returns true if State defines transitions to any other state

## Member Data Documentation

## ◆ Any

str Any = 'ANY'
| static

## ◆ notify

notify = directNotify.newCategory("State")
| static

## ◆ States

States = weakref.WeakKeyDictionary()
| static