[U3d][Animator]StateMachineBehaviour

来源:互联网 发布:程序员都用什么电脑 编辑:程序博客网 时间:2024/05/29 03:45

StateMachineBehaviour

Description

StateMachineBehaviour is a component that can be added to a state machine state. It's the base class every script on a state derives from.

By default the Animator does instantiate a new instance of each behaviour define in the controller. The class attributeSharedBetweenAnimatorsAttribute control how behaviours are instantiated.

StateMachineBehaviour has some predefined messages:OnStateEnter,OnStateExit, OnStateIK, OnStateMove, OnStateUpdate.


OnStateEnterCalled on the first Update frame when a statemachine evaluate this state.OnStateExitCalled on the last update frame when a statemachine evaluate this state.OnStateIKCalled right after MonoBehaviour.OnAnimatorIK.OnStateMoveCalled right after MonoBehaviour.OnAnimatorMove.OnStateUpdateCalled at each Update frame except for the first and last frame.


状态机行为

描述

StateMachineBehaviour is a component that can be added to a state machine state. It's the base class every script on a state derives from.

StateMachineBehaviour脚本可以通过AddBehaviour添加到状态机的子状态下,state或者subState都可以。

By default the Animator does instantiate a new instance of each behaviour define in the controller. The class attributeSharedBetweenAnimatorsAttribute control how behaviours are instantiated.

StateMachineBehaviour has some predefined messages:OnStateEnter,OnStateExit, OnStateIK, OnStateMove, OnStateUpdate.


OnStateEnterCalled on the first Update frame when a statemachine evaluate this state.OnStateExitCalled on the last update frame when a statemachine evaluate this state.OnStateIKCalled right after MonoBehaviour.OnAnimatorIK.OnStateMoveCalled right after MonoBehaviour.OnAnimatorMove.OnStateUpdateCalled at each Update frame except for the first and last frame.



使用

挂载需要监听的Animator.AnimationClip下。




使用

挂载需要监听的Animator.AnimationClip下。


0 0
原创粉丝点击