• Manual
  • Scripting API
  • Changelog
  • License
Show / Hide Table of Contents
  • AlchemyBow.Core
    • CoreController<TProjectContext>
    • CoreProjectContext
    • ICoreLoadable
    • ICoreLoadingCallbacksHandler
    • LoadablesProgress
    • OperationHandle
  • AlchemyBow.Core.Editor.Utilities
    • CoreEditorUtility
    • IndentStringBuilder
  • AlchemyBow.Core.Editor.Windows
    • CoreManagementWindow
  • AlchemyBow.Core.Editor.Wizards
    • CoreControllerScriptWizard
    • CoreProjectContextPrefabWizard
    • CoreProjectContextScriptWizard
    • CoreQuickStartWizard
    • ValidationMessageList
    • WizardValidationUtility
    • WizardWindow
  • AlchemyBow.Core.Extras.Behaviours
    • CoreBehaviour
    • CoreBehaviourEnablingStrategy
  • AlchemyBow.Core.Extras.FluentBindings
    • ContainerFluentExtensions
    • FluentBinding
  • AlchemyBow.Core.Extras.Installers
    • ChildrenCompositeMonoInstaller
    • UnityObjectMonoInstaller
  • AlchemyBow.Core.IoC
    • Container
    • DynamicCollectionBindingUtility
    • DynamicInjector<T>
    • IBindOnlyContainer
    • InjectAttribute
    • InjectionTargetAttribute
    • MonoInstaller
  • AlchemyBow.Core.IoC.Elements
    • DynamicInjectorBase
    • InjectionInfo
    • ReflectionFieldsSetter
  • AlchemyBow.Core.States
    • ICondition
    • IState
    • StateGraph
    • StateGraphComposer
  • AlchemyBow.Core.States.Elements
    • StateGraphLink
  • AlchemyBow.Core.States.Prototyping
    • PrototypeCondition
    • PrototypeState

Class StateGraphComposer

A helper class used to describe the StateGraph nodes.

Inheritance
object
StateGraphComposer
Namespace: AlchemyBow.Core.States
Assembly: AlchemyBow.Core.dll
Syntax
public sealed class StateGraphComposer

Constructors

StateGraphComposer(IState)

Creates an empty description of the StateGraph node.

Declaration
public StateGraphComposer(IState state)
Parameters
Type Name Description
IState state

The state associated with the node. (null is supported.)

Properties

Links

Returns all added links between the child nodes.

Declaration
public IReadOnlyList<StateGraphLink> Links { get; }
Property Value
Type Description
IReadOnlyList<StateGraphLink>

All added links between the child nodes

Nodes

Returns all added descriptions of the child nodes.

Declaration
public IReadOnlyList<StateGraphComposer> Nodes { get; }
Property Value
Type Description
IReadOnlyList<StateGraphComposer>

All added descriptions of the child nodes

State

Returns the state associated with the node if any.

Declaration
public IState State { get; }
Property Value
Type Description
IState

The state associated with the node if any.

Methods

AddLink(StateGraphComposer, StateGraphComposer, ICondition)

Adds a link (transition) between the specified child nodes.

Declaration
public void AddLink(StateGraphComposer from, StateGraphComposer to, ICondition condition)
Parameters
Type Name Description
StateGraphComposer from

The origin child node.

StateGraphComposer to

The destination child node.

ICondition condition

The transition condition.

AddNode(StateGraphComposer)

Adds a child node description.

Declaration
public void AddNode(StateGraphComposer composer)
Parameters
Type Name Description
StateGraphComposer composer

The description of the child node.

GetGraphPaths()

Returns all possible paths from root to leaves. Uses .ToString() on the State property value to determine path segment names.

Declaration
public List<string> GetGraphPaths()
Returns
Type Description
List<string>

All possible paths from root to leaves.

Remarks

This method is useful for debugging. However, consider using the #if UNITY_EDITOR directive to avoid performance issues in the build.

Validate()

Throws exceptions if the graph node description is invalid.

Declaration
public void Validate()
Remarks

This method is useful for debugging. However, consider using the #if UNITY_EDITOR directive to avoid performance issues in the build.

In this article
Back to top Copyright © 2022-2024 AlchemyBow | Generated by DocFX