SStateMachine
Last updated
Last updated
Sinespace® is a registered trademark of Sine Wave Entertainment Ltd, All Rights Reserved.
void NextState ()
Enter the next state
void PrevState ()
void SetState (int state) void SetState (string state)
Enters the state of being set that its order is "state"
The state machine will bind itself to all Toggles, Buttons, Dropdowns and Sliders on the SGameObject it is in or on a specified SGameObject.
Binding to Button : Clicking button will call NextState() Binding to Toggle: Toggle On sets State to 1, Toggle Off sets state to 2 Binding to Dropdown: Selecting will set State to that selection's caption text Binding to Slider: Moving slider changes State to slider value
bool Enabled get
set
Whether the simple state machine component is Enabled or not
int StateCount get
Total number of States.
string[] StateNames get
A list of the names of all States.
int CurrentState get
The index number of the current state.
string CurrentStateName get
The name of the current state, or null if no state.
string ComponentName get
The name of this component.
The GameObject this component is attached to. A component is always attached to a GameObject.
void BindToUI () void BindToUI ( go)
GameObject get
void NextState ()
void PrevState ()
bool Enabled get
set
int StateCount get
string[] StateNames get
int CurrentState get
string CurrentStateName get
string ComponentName get
SGameObject GameObject get
state
int
The index of the state. First state is 1.
state
string
The name of the state as set in the State Machine component.
go
SGameObject
A specific SGameObject which this State Machine will bind to.