AnimationNodeTimeSeek

继承: AnimationNode < Resource < RefCounted < Object

对时间进行检索的动画节点,在 AnimationTree 中使用。

描述

这个动画节点可用于使检索命令发生在动画图的任何次级子节点上。用于从 AnimationNodeBlendTree 的开头或某个特定播放位置开始播放 Animation

设置时间并更改动画播放后,时间检索节点会在下一个处理帧中将其 seek_request 值设置为 -1.0,自动进入睡眠模式。

GDScriptC#

  1. # 从开始处播放子动画。
  2. animation_tree.set("parameters/TimeSeek/seek_request", 0.0)
  3. # 替代语法(与上述结果相同)。
  4. animation_tree["parameters/TimeSeek/seek_request"] = 0.0
  5. # 从 12 秒的时间戳开始播放子动画。
  6. animation_tree.set("parameters/TimeSeek/seek_request", 12.0)
  7. # 替代语法(与上述结果相同)。
  8. animation_tree["parameters/TimeSeek/seek_request"] = 12.0
  1. // 从开始处播放子动画。
  2. animationTree.Set("parameters/TimeSeek/seek_request", 0.0);
  3. // 从 12 秒的时间戳开始播放子动画。
  4. animationTree.Set("parameters/TimeSeek/seek_request", 12.0);

教程

Previous Next


© 版权所有 2014-present Juan Linietsky, Ariel Manzur and the Godot community (CC BY 3.0). Revision b1c660f7.

Built with Sphinx using a theme provided by Read the Docs.