Class BaseStateModel
Base class for defining state model logic to use in conjunction with the State class Allows for retrieving current state mode and comparing states
Inherited Members
Namespace: Microsoft.MixedReality.Toolkit.UI
Assembly: cs.temp.dll.dll
Syntax
public abstract class BaseStateModel
Constructors
BaseStateModel()
Declaration
public BaseStateModel()
BaseStateModel()
Declaration
public BaseStateModel()
BaseStateModel(State)
Declaration
public BaseStateModel(State defaultState)
Parameters
Type | Name | Description |
---|---|---|
State | defaultState |
BaseStateModel(State)
Declaration
public BaseStateModel(State defaultState)
Parameters
Type | Name | Description |
---|---|---|
State | defaultState |
Fields
allStates
Declaration
protected State[] allStates
Field Value
Type | Description |
---|---|
State[] |
allStates
Declaration
protected State[] allStates
Field Value
Type | Description |
---|---|
State[] |
currentState
Declaration
protected State currentState
Field Value
Type | Description |
---|---|
State |
currentState
Declaration
protected State currentState
Field Value
Type | Description |
---|---|
State |
stateList
Declaration
protected List<State> stateList
Field Value
Type | Description |
---|---|
List<State> |
stateList
Declaration
protected List<State> stateList
Field Value
Type | Description |
---|---|
List<State> |
Methods
CompareStates()
Compare all state values, set appropriate current State and return that current State
Declaration
public abstract State CompareStates()
Returns
Type | Description |
---|---|
State | Current State after comparing State values |
CompareStates()
Compare all state values, set appropriate current State and return that current State
Declaration
public abstract State CompareStates()
Returns
Type | Description |
---|---|
State | Current State after comparing State values |
CurrentState()
Return the current State object
Declaration
public virtual State CurrentState()
Returns
Type | Description |
---|---|
State | Return the current State object |
CurrentState()
Return the current State object
Declaration
public virtual State CurrentState()
Returns
Type | Description |
---|---|
State | Return the current State object |
GetBit()
Declaration
protected int GetBit()
Returns
Type | Description |
---|---|
Int32 |
GetBit()
Declaration
protected int GetBit()
Returns
Type | Description |
---|---|
Int32 |
GetState(Int32)
Get the State object with the given index
Declaration
public State GetState(int index)
Parameters
Type | Name | Description |
---|---|---|
Int32 | index | index of state to access |
Returns
Type | Description |
---|---|
State | State Object at given index |
GetState(Int32)
Get the State object with the given index
Declaration
public State GetState(int index)
Parameters
Type | Name | Description |
---|---|---|
Int32 | index | index of state to access |
Returns
Type | Description |
---|---|
State | State Object at given index |
GetStates()
Get list of available States for this State Model
Declaration
public abstract State[] GetStates()
Returns
Type | Description |
---|---|
State[] | Array of available State objects |
GetStates()
Get list of available States for this State Model
Declaration
public abstract State[] GetStates()
Returns
Type | Description |
---|---|
State[] | Array of available State objects |
GetStateValue(Int32)
Get the value of the state with the given index
Declaration
public int GetStateValue(int index)
Parameters
Type | Name | Description |
---|---|---|
Int32 | index | index of state to access |
Returns
Type | Description |
---|---|
Int32 | value of the state |
GetStateValue(Int32)
Get the value of the state with the given index
Declaration
public int GetStateValue(int index)
Parameters
Type | Name | Description |
---|---|---|
Int32 | index | index of state to access |
Returns
Type | Description |
---|---|
Int32 | value of the state |
ImportStates(List<State>)
Import the list of states into this state model
Declaration
public void ImportStates(List<State> states)
Parameters
Type | Name | Description |
---|---|---|
List<State> | states | list of state objects to import |
ImportStates(List<State>)
Import the list of states into this state model
Declaration
public void ImportStates(List<State> states)
Parameters
Type | Name | Description |
---|---|---|
List<State> | states | list of state objects to import |
SetCurrentState(State)
Set the current state to the provided State object
Declaration
public virtual void SetCurrentState(State state)
Parameters
Type | Name | Description |
---|---|---|
State | state | State object to set |
SetCurrentState(State)
Set the current state to the provided State object
Declaration
public virtual void SetCurrentState(State state)
Parameters
Type | Name | Description |
---|---|---|
State | state | State object to set |
SetStateListValue(Int32, Int32)
Declaration
protected virtual void SetStateListValue(int index, int value)
Parameters
SetStateListValue(Int32, Int32)
Declaration
protected virtual void SetStateListValue(int index, int value)
Parameters
SetStateOff(Int32)
Set the value of the state with given index to off (0)
Declaration
public virtual void SetStateOff(int index)
Parameters
Type | Name | Description |
---|---|---|
Int32 | index | index of state to access |
SetStateOff(Int32)
Set the value of the state with given index to off (0)
Declaration
public virtual void SetStateOff(int index)
Parameters
Type | Name | Description |
---|---|---|
Int32 | index | index of state to access |
SetStateOn(Int32)
Set the value of the state with given index to on (1)
Declaration
public virtual void SetStateOn(int index)
Parameters
Type | Name | Description |
---|---|---|
Int32 | index | index of state to access |
SetStateOn(Int32)
Set the value of the state with given index to on (1)
Declaration
public virtual void SetStateOn(int index)
Parameters
Type | Name | Description |
---|---|---|
Int32 | index | index of state to access |
SetStateValue(Int32, Int32)
Set value of state with given index to the provided value
Declaration
public virtual void SetStateValue(int index, int value)
Parameters
SetStateValue(Int32, Int32)
Set value of state with given index to the provided value
Declaration
public virtual void SetStateValue(int index, int value)