Finite State Machine Helper 1.0

脚本,价格:$12.00,大小:2.8 MB

  1. UnityStore
    2.8 MB
    Unity 5.2.2 或更高版本
    [​IMG]有限状态机帮手是一个非常强大的轻量级的C #框架在你的项目中实现状态机。它既支持简单的状态机,也支持非常复杂的多层次嵌套状态。













    Finite State Machine Helper is a highly robust yet lightweight C# framework to implement state machines in your project. It supports both simple state machines as well as very complex multi-level nested states.

    [ Online Documentation ]

    Basic features

    - Use your own classes with Enter(), Exit() and Update() functions for states. Develop state machines like a professional, no more silly enums and switch cases!

    - Just call a single line of code to transition to another state, the framework will automatically Exit() the current state and Enter() the next state.

    Advanced features

    - Nested states within states! Rather than just a single layer of states, your states could have states within them as well, with unlimited depth. For eg, your character has an Alive and Dead state, and the Alive State is broken down further into Walking and Swimming states.

    - AND vs OR states. If a state has children, specifying it as an OR state means that only one child state is active at any time. Specifying it as an AND state means all children states are active. Very useful for running monitors/managers in parallel!

    - Passing parameters during transitions. When your character transitions from Idle to Combat state, you can send the enemy character's GameObject (or any parameters) inside the transition, and this will automatically call the Combat state's constructor that matches those parameters.

    - Broadcast messages to all active states in the state machine. This is useful if you have a complex multi-level state tree and need to transition a state from within a different state, or you want multiple states to transition with one line of code.

    - Override the state machine class with your own class! This way you can have your own member variables accessible to any active state in the state machine, regardless of its depth.

    - Easy debugging! Watching the state machine object in the debugger will allow you to expand the entire tree of currently active states. You can also print the current tree to the log anytime by iterating through the tree.

    - Define your statemachine structure with simple, easy-to-read syntax. No need to struggle with GUI tools.

    Note: The actual library is p>