You've already forked taptap2024_GJ_chidouren
init
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
# FSMController.GetCurrentTransition
|
||||
|
||||
|
||||
|
||||
### 方法:
|
||||
|
||||
public FSMTransition GetCurrentTransition(int index);
|
||||
|
||||
### 说明:
|
||||
|
||||
获取当前的状态切换信息
|
||||
|
||||
|
||||
### 参数
|
||||
|
||||
| 名称 | 说明 |
|
||||
| ----------- | ----------- |
|
||||
| index | 状态配置下标 |
|
||||
|
||||
### 返回值
|
||||
|
||||
类型 : **FSMTransition** [详细信息](/Documentation~/ClassApi/FSMTransition.md)
|
||||
|
||||
|
||||
|
||||
### 代码示例:
|
||||
|
||||
> ```none
|
||||
>
|
||||
>using UnityEngine;
|
||||
>
|
||||
>public class TestFSMController : MonoBehaviour
|
||||
>{
|
||||
> private FSMController controller;
|
||||
> void Start()
|
||||
> {
|
||||
> controller = GetComponent<FSMController>();
|
||||
> // 获取下表为0的状态配置的状态切换的信息
|
||||
> FSMTransition info = controller.GetCurrentTransition(0);
|
||||
> Debug.LogFormat("开始状态:{0} 目标状态:{1}",info.Data.fromStateName,info.Data.toStateName);
|
||||
> }
|
||||
>}
|
||||
> ```
|
||||
|
||||
Reference in New Issue
Block a user