资源图标

Finite State Machine Helper 1.0

没有下载许可
官方售价
$12.00
文件大小
2.8 MB
开发者
Fairuz
版本要求
Unity 5.2.2 或更高版本
 alt=

 alt=
有限状态机帮手是一个非常强大的轻量级的C #框架在你的项目中实现状态机。它既支持简单的状态机,也支持非常复杂的多层次嵌套状态。

在线文档]

基本特点

使用自己的类随着国家enter(),exit()和update()功能。发展国家机器像一个专业的,没有更傻的枚举和开关的情况下!

-打一行代码转换到另一个状态时,框架会自动exit()的当前状态和未来状态enter()。

先进的功能

嵌套的状态在美国!而不是只是一个单一的层的状态,你的国家可以有他们的状态,以及无限的深度。例如,你的角色有一个活着的和死的状态,活着的状态被分解成步行和游泳状态。

和对或状态。如果一个国家有孩子,指定它作为一个或状态意味着只有一个孩子的状态是活跃在任何时间。指定它作为一个和状态意味着所有的孩子都是活跃的。非常有用的运行监视器\/管理器的并行!

转换过程中的参数。当你的角色转换,从怠速到战斗状态,你可以把敌人的角色的游戏对象(或参数)内的过渡,这将自动调用战斗状态的构造函数的参数匹配。

广播消息对状态机中的所有活动状态。这是有用的,如果你有一个复杂的多层次的状态树,需要从一个不同的状态过渡一个状态,或者您希望多个状态转换为一行代码。

重写状态机用自己的类的类!这样,您可以有自己的成员变量访问状态机中的任何活动状态,无论它的深度。

易于调试!在调试器中监视状态机对象将允许您扩展当前活动状态的整个树。你也可以随时打印当前树的遍历树的日志。

定义你的状态机结构简单,易于阅读的语法。无需与图形用户界面工具进行斗争。

注:实际的图书馆是p>
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>
作者
UnityStore
下载
0
首次发布
最后更新
评分
0.00 星 0 星

来自UnityStore的更多资源

顶部 底部