# State

from direct.fsm.State import State

## Inheritance:

State: DirectObject
DirectObject:

## Methods of State:

__enterChildren
__exitChildren
__init__
__str__
addChild
addTransition
enter
exit
getChildren
getEnterFunc
getExitFunc
getName
getTransitions
hasChildren
isTransitionDefined
removeChild
setChildren
setEnterFunc
setExitFunc
setName
setTransitions
transitionsToAny

## Methods of DirectObject:

__init__
accept
acceptOnce
classTree
getAllAccepting
ignore
ignoreAll
isAccepting
isIgnoring

__enterChildren def __enterChildren(self, argList) Enter all child FSMs

__exitChildren def __exitChildren(self, argList) Exit all child FSMs

__init__ def __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).

__str__ def __str__(self) Undocumented function.

addChild def addChild(self, ClassicFSM) Add the given ClassicFSM to list of child FSMs

addTransition def addTransition(self, transition) addTransitions(self, string)

enter def enter(self, argList=[]) Call the enter function for this state

exit def exit(self, argList=[]) Call the exit function for this state

getChildren def getChildren(self) Return the list of child FSMs

getEnterFunc def getEnterFunc(self) Undocumented function.

getExitFunc def getExitFunc(self) Undocumented function.

getName def getName(self) Undocumented function.

getTransitions def 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 def hasChildren(self) Return true if state has child FSMs

isTransitionDefined def isTransitionDefined(self, otherState) Undocumented function.

removeChild def removeChild(self, ClassicFSM) Remove the given ClassicFSM from list of child FSMs

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

setEnterFunc def setEnterFunc(self, stateEnterFunc) Undocumented function.

setExitFunc def setExitFunc(self, stateExitFunc) Undocumented function.

setName def setName(self, stateName) Undocumented function.

setTransitions def setTransitions(self, stateTransitions) setTransitions(self, string[])

transitionsToAny def transitionsToAny(self) returns true if State defines transitions to any other state

__init__ def __init__(self) Undocumented function.

accept def accept(self, event, method, extraArgs=[]) Undocumented function.

acceptOnce def acceptOnce(self, event, method, extraArgs=[]) Undocumented function.

classTree def classTree(self) Undocumented function.

getAllAccepting def getAllAccepting(self) Undocumented function.

ignore def ignore(self, event) Undocumented function.

ignoreAll def ignoreAll(self) Undocumented function.

isAccepting def isAccepting(self, event) Undocumented function.

isIgnoring def isIgnoring(self, event) Undocumented function.