AnimationNodeStateMachineTransition¶
Inherits: Resource < Reference < Object
教程¶
属性¶
|
||
|
||
|
||
|
||
|
||
|
信号¶
advance_condition_changed ( )
变更advance_condition时发出。
枚举¶
enum SwitchMode:
SWITCH_MODE_IMMEDIATE = 0 --- 立即切换到下一个状态。当前状态将结束,并融合到新状态的开始。
SWITCH_MODE_SYNC = 1 --- 立即切换到下一个状态,但会寻找新的状态到旧状态的播放位置。
SWITCH_MODE_AT_END = 2 --- 等待当前状态播放结束,然后切换到下一个状态动画的开头。
属性说明¶
String advance_condition
Default |
|
Setter |
set_advance_condition(value) |
Getter |
get_advance_condition() |
Turn on auto advance when this condition is set. The provided name will become a boolean parameter on the AnimationTree that can be controlled from code (see #controlling-from-code in 使用 AnimationTree). For example, if AnimationTree.tree_root is an AnimationNodeStateMachine and advance_condition is set to "idle"
:
$animation_tree["parameters/conditions/idle"] = is_on_floor and (linear_velocity.x == 0)
bool auto_advance
Default |
|
Setter |
set_auto_advance(value) |
Getter |
has_auto_advance() |
当达到该状态时,自动开启过渡。这与SWITCH_MODE_AT_END配合使用效果最好。
bool disabled
Default |
|
Setter |
set_disabled(value) |
Getter |
is_disabled() |
不要在AnimationNodeStateMachinePlayback.travel或auto_advance期间使用这个过渡。
int priority
Default |
|
Setter |
set_priority(value) |
Getter |
get_priority() |
当通过AnimationNodeStateMachinePlayback.travel或auto_advance在树中旅行时,优先级较低的转场。
SwitchMode switch_mode
Default |
|
Setter |
set_switch_mode(value) |
Getter |
get_switch_mode() |
过渡类型.
float xfade_time
Default |
|
Setter |
set_xfade_time(value) |
Getter |
get_xfade_time() |
这个状态和下一个状态之间的交叉渐变时间。