You've already forked taptap2024_GJ_chidouren
init
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
# FSMController.StartupFSM
|
||||
|
||||
|
||||
|
||||
### 方法:
|
||||
|
||||
public static FSMController StartupFSM(string fsmName,RuntimeFSMController fsm,object userData = null);
|
||||
|
||||
### 说明:
|
||||
|
||||
启动状态(适用于没有具体游戏物体的状态管理,例如:游戏状态)
|
||||
|
||||
|
||||
### 参数
|
||||
|
||||
| 名称 | 说明 |
|
||||
| ----------- | ----------- |
|
||||
| fsmName | 状态机名称 |
|
||||
| fsm | 状态配置文件 |
|
||||
| userData | 自定义参数或数据 |
|
||||
|
||||
### 返回值
|
||||
|
||||
类型 : **FSMController** [详细信息](/Documentation~/ClassApi/FSMController.md)
|
||||
|
||||
### 代码示例:
|
||||
|
||||
> ```none
|
||||
>
|
||||
>using UnityEngine;
|
||||
>
|
||||
>public class TestFSMController : MonoBehaviour
|
||||
>{
|
||||
> private FSMController controller;
|
||||
> void Start()
|
||||
> {
|
||||
> // 加载状态配置文件(这里只是示例,请根据自己的需求使用合适的方式加载)
|
||||
> RuntimeFSMController gameFSM = Resources.Load<RuntimeFSMController>("game_state");
|
||||
> // 启动状态配置文件
|
||||
> FSMController.StartupFSM("GameState",gameFSM);
|
||||
> }
|
||||
>}
|
||||
> ```
|
||||
Reference in New Issue
Block a user