• 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 StateMachineBase

Inheritance
System.Object
RuntimeObject
StateMachineBase
StateMachine
StateMachineController
Inherited Members
RuntimeObject.Clear()
RuntimeObject.Reset()
Namespace: ScriptableFramework
Assembly: cs.temp.dll.dll
Syntax
public abstract class StateMachineBase : RuntimeObject

Fields

defaultState

A enum to determine how the Clear () and Reset () functions behave.

Declaration
public DefaultState defaultState
Field Value
Type Description
DefaultState

selectionIndex

The current index of the state machine. Default value is 0. When Clear () is called and defaultState is not set to first active, will be set to -1.

Declaration
public int selectionIndex
Field Value
Type Description
System.Int32

Methods

ApplyState(Boolean)

Actually runs the loop which sets the state of all objects in the list.

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

State to apply for all.

ApplyState(Int32)

Actually runs the loop which updates the state.

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

Index of the state to be active.

ApplyState(Int32, Boolean)

Actually applies the new state to the selected object.

Declaration
protected abstract 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.

ApplyState(Int32, Int32, Boolean)

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

Declaration
protected abstract 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.

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 abstract bool CheckListBeforeUpdate()
Returns
Type Description
System.Boolean

If the list is null or not.

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 abstract 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.

CheckSelectionIndexBeforeUpdate(Int32)

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

Declaration
protected abstract 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.

UpdateState(Boolean)

Applies the same state to all objects in the current list.

Declaration
public void UpdateState(bool stateForAll)
Parameters
Type Name Description
System.Boolean stateForAll

The new state for all contained object.

UpdateState(Int32)

Applies a new single state to the list.

Declaration
public void UpdateState(int newSelectionIndex)
Parameters
Type Name Description
System.Int32 newSelectionIndex

Index of the state to be active.

UpdateState(Int32, Boolean)

Applies a state to a single object without affecting other objects in the list.

Declaration
public void UpdateState(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.

UpdateState(Int32, Int32, Boolean)

Applies a state to all objects in the given range and the opposite state to the objects outside of the range.

Declaration
public void UpdateState(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.

Back to top Generated by DocFX