• Manual
  • Scripting API
Show / Hide Table of Contents
  • ScriptableFramework
    • AnimatorList
    • AnimatorListPopulator
    • AnimatorReference
    • AnimatorReferencePopulator
    • AppEvent
    • AppEvent<T>
    • AppEventBase
    • AppEventListener
    • AppEventListener<T>
    • AppEventListenerBase
    • AppVersion
    • BoolEvent
    • BoolEventListener
    • BoolList
    • BoolResponse
    • BoolValue
    • BoundsEvent
    • BoundsEventListener
    • BoundsResponse
    • ColorEvent
    • ColorEventListener
    • ColorList
    • ColorResponse
    • ColorValue
    • DataString
    • DefaultState
    • Dragable
    • Extensions
    • FloatEvent
    • FloatEventListener
    • FloatList
    • FloatResponse
    • FloatValue
    • FoldoutAttribute
    • GameObjectList
    • GameObjectListPopulator
    • GameObjectReference
    • GameObjectReferencePopulator
    • InputValidation
    • IntEvent
    • IntEventListener
    • IntList
    • IntResponse
    • IntValue
    • IReferenceContainer
    • IValueContainer
    • MeshRendererList
    • MeshRendererListPopulator
    • MeshRendererReference
    • MeshRendererReferencePopulator
    • PathType
    • Platform
    • ReferenceItem<T>
    • ReferenceList<T>
    • ReleaseType
    • RuntimeItem<T>
    • RuntimeList<T>
    • RuntimeObject
    • RuntimeObjectManager
    • SceneAsset
    • SceneAsset.SceneLoadException
    • SearchableEnumAttribute
    • StateChange
    • StateMachine
    • StateMachineBase
    • StateMachineController
    • StateMachineReset
    • StateToggle
    • StringEvent
    • StringEventListener
    • StringList
    • StringResponse
    • StringValue
    • TransformList
    • TransformListPopulator
    • TransformReference
    • TransformReferencePopulator
    • ValueItem<T>
    • ValueList<T>
    • Vector2Event
    • Vector2EventListener
    • Vector2List
    • Vector2Response
    • Vector2Value
    • Vector3Event
    • Vector3EventListener
    • Vector3List
    • Vector3Response
    • Vector3Value
  • ScriptableFramework.CustomEditors
    • AppEventEditor
    • AppEventListenerEditor
    • AppVersionEditor
    • DataStringEditor
    • EditorOverride
    • EditorOverride.Cache
    • EditorOverride.Colors
    • FrameworkExtensions
    • RuntimeObjectEditor
    • RuntimeObjectManagerEditor
    • SceneAssetEditor
    • SearchableEnumDrawer
    • SearchablePopup
  • ScriptableFramework.Tests
    • AppEventGenericTests
    • AppEventGenericTests.ClearData
    • AppEventGenericTests.RaiseEvent
    • AppEventGenericTests.RegisterListener
    • AppEventGenericTests.UnregisterListener
    • AppEventListenerGenericTests
    • AppEventListenerGenericTests.OnEventRaised
    • AppEventListenerGenericTests.RegisterSelf
    • AppEventListenerGenericTests.UnregisterSelf
    • AppEventListenerTests
    • AppEventListenerTests.OnEventRaised
    • AppEventListenerTests.RegisterSelf
    • AppEventListenerTests.UnregisterSelf
    • AppEventTests
    • AppEventTests.ClearData
    • AppEventTests.RaiseEvent
    • AppEventTests.RegisterListener
    • AppEventTests.UnregisterListener
    • DataStringTests
    • ListenerResponder
    • ReferenceItemTests
    • ReferenceItemTests.ClearData
    • ReferenceItemTests.ClearWithForAssetReferencingOnly
    • ReferenceListTests
    • ReferenceListTests.ClearData
    • ReferenceListTests.ClearWithForAssetReferencingOnly
    • StateMachineTests
    • StateMachineTests.ClearData
    • StateMachineTests.ReapplyState
    • StateMachineTests.UpdateStateForAll
    • StateMachineTests.UpdateStateForIndex
    • StateMachineTests.UpdateStateForRange
    • StateMachineTests.UpdateStateForSingle
    • StateToggleTests
    • StateToggleTests.RespondToStateMachineChange
    • StateToggleTests.UpdateStateMachine
    • StringListTests
    • ValueItemTests
    • ValueItemTests.ClearData
    • ValueListTests
    • ValueListTests.ClearData

Class StateMachineController

A high level wrapper class that encapsulates a list of StateMachines and drives the active state of each sub object according to a given list index that represents a state.

Inheritance
System.Object
RuntimeObject
StateMachineBase
StateMachineController
Inherited Members
StateMachineBase.defaultState
StateMachineBase.selectionIndex
StateMachineBase.UpdateState(Int32)
StateMachineBase.UpdateState(Boolean)
StateMachineBase.UpdateState(Int32, Boolean)
StateMachineBase.UpdateState(Int32, Int32, Boolean)
Namespace: ScriptableFramework
Assembly: cs.temp.dll.dll
Syntax
public class StateMachineController : StateMachineBase

Fields

subStateMachines

A list of StateMachines that represent the current object state. The order of the objects is expected to match the order of the states.

Declaration
public List<StateMachineBase> subStateMachines
Field Value
Type Description
List<StateMachineBase>

Methods

ApplyState(Boolean)

Actually runs the loop which sets each object's state on or off.

Declaration
protected override void ApplyState(bool stateForAll)
Parameters
Type Name Description
System.Boolean stateForAll

The new state for all objects.

Overrides
StateMachineBase.ApplyState(Boolean)

ApplyState(Int32)

Actually runs the loop which sets each object's state on or off.

Declaration
protected override void ApplyState(int newSelectionIndex)
Parameters
Type Name Description
System.Int32 newSelectionIndex

Index of the state to be active.

Overrides
StateMachineBase.ApplyState(Int32)

ApplyState(Int32, Boolean)

Actually applies the new state to the selected object.

Declaration
protected override void ApplyState(int newSelectionIndex, bool stateAtThisObject)
Parameters
Type Name Description
System.Int32 newSelectionIndex

The index of the object to update.

System.Boolean stateAtThisObject

The state to provide that object with.

Overrides
StateMachineBase.ApplyState(Int32, Boolean)

ApplyState(Int32, Int32, Boolean)

Actually runs the loop which applies your given range of objects and the rest with another.

Declaration
protected override void ApplyState(int startIndex, int length, bool stateToApply)
Parameters
Type Name Description
System.Int32 startIndex

Where to start applying your state (inclusive).

System.Int32 length

How many objects to affect.

System.Boolean stateToApply

The state to apply within your given range.

Overrides
StateMachineBase.ApplyState(Int32, Int32, Boolean)

CheckListBeforeUpdate()

Checks if the list is null. Since the list can be a varying type, defining this as an abstract function is needed to help reduce code.

Declaration
protected override bool CheckListBeforeUpdate()
Returns
Type Description
System.Boolean

If the list is null or not.

Overrides
StateMachineBase.CheckListBeforeUpdate()

CheckListItemBeforeUpdate(Int32)

Checks if an item in the list is null. Since the list can be a varying type, defining this as an abstract function is needed to help reduce code.

Declaration
protected override bool CheckListItemBeforeUpdate(int objectIndex)
Parameters
Type Name Description
System.Int32 objectIndex

The index of the object to check.

Returns
Type Description
System.Boolean

If the item is null or not.

Overrides
StateMachineBase.CheckListItemBeforeUpdate(Int32)

CheckSelectionIndexBeforeUpdate(Int32)

Checks if the index is greater than -1 but less than the length of the list.

Declaration
protected override bool CheckSelectionIndexBeforeUpdate(int objectIndex)
Parameters
Type Name Description
System.Int32 objectIndex

The index of the object to check.

Returns
Type Description
System.Boolean

True if the index is within a range that won't throw an out of range exception.

Overrides
StateMachineBase.CheckSelectionIndexBeforeUpdate(Int32)

Clear()

If the list is not null, and has a count beyond 0, sets the current state according to defaultState.

Declaration
public override void Clear()
Overrides
RuntimeObject.Clear()

Reset()

Calls Clear ()

Declaration
public override void Reset()
Overrides
RuntimeObject.Reset()
Back to top Generated by DocFX