#import <TreeState.h>
Public Member Functions | |
(void) | - addChild: |
(CCArray *) | - getChildren |
(void) | - setAsLeafNode: |
(void) | - setParent: |
(BOOL) | - isLeaf |
(BOOL) | - isEqualTo: |
(Action) | - getAction |
(void) | - setAction: |
(CCArray *) | - buildRoute: |
(CCArray *) | - buildRoutes: |
(void) | - printStructure |
Protected Attributes | |
int | nodeValue |
Action | action |
TreeState * | parent |
CCArray * | children |
Definition at line 16 of file TreeState.h.
- (CCArray *) buildRoute: | (CCArray*) | _route |
Recursively builds an array with the tree nodes
Definition at line 176 of file TreeState.m.
- (CCArray *) buildRoutes: | (CCArray*) | _routes |
Recursively builds the structure
Definition at line 190 of file TreeState.m.
Gets the action which leads to this state
Definition at line 142 of file TreeState.m.
- (CCArray *) getChildren |
Returns the child nodes
Definition at line 124 of file TreeState.m.
- (BOOL) isEqualTo: | (TreeState*) | _state |
Compares the gameobjects/actions to determine if the states are the same
the | state to compare |
Definition at line 106 of file TreeState.m.
- (BOOL) isLeaf |
If the node value's 1 or -1, it's a leaf
Definition at line 94 of file TreeState.m.
- (void) printStructure |
Recursively prints the structure
Definition at line 205 of file TreeState.m.
- (void) setAction: | (Action) | _action |
Sets the action which leads to this state
the | action to set |
Definition at line 133 of file TreeState.m.
- (void) setAsLeafNode: | (CharacterStates) | _state |
Sets the nodeValue according to the passed state
the | current state |
Definition at line 63 of file TreeState.m.
- (void) setParent: | (TreeState*) | _parent |
Definition at line 20 of file TreeState.h.
- (CCArray*) children [protected] |
Definition at line 23 of file TreeState.h.
- (int) nodeValue [protected] |
Definition at line 19 of file TreeState.h.
Definition at line 22 of file TreeState.h.