Skip to content

Latest commit

 

History

History
19 lines (15 loc) · 725 Bytes

README.md

File metadata and controls

19 lines (15 loc) · 725 Bytes

State System

The State System provides a flexible and reusable way to manage entity behavior. It uses a StateMachine to coordinate transitions between individual State instances.

  • StateMachine: Controls the active state of an entity.
  • State: Represents an individual behavior, such as moving, attacking, or collecting resources.

Diagram

stateDiagram-v2
    [*] --> IdleState
    IdleState --> MoveState: Move Command
    MoveState --> IdleState: Destination Reached
    MoveState --> AttackState: Enemy In Range
    AttackState --> IdleState: Target Destroyed
    IdleState --> CollectState: Collect Command
    CollectState --> IdleState: Collection Complete
Loading