class_animationnodetimeseek.rst 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/AnimationNodeTimeSeek.xml.
  6. .. _class_AnimationNodeTimeSeek:
  7. AnimationNodeTimeSeek
  8. =====================
  9. **Inherits:** :ref:`AnimationNode<class_AnimationNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. A time-seeking animation node used in :ref:`AnimationTree<class_AnimationTree>`.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. This animation node can be used to cause a seek command to happen to any sub-children of the animation graph. Use to play an :ref:`Animation<class_Animation>` from the start or a certain playback position inside the :ref:`AnimationNodeBlendTree<class_AnimationNodeBlendTree>`.
  15. After setting the time and changing the animation playback, the time seek node automatically goes into sleep mode on the next process frame by setting its ``seek_request`` value to ``-1.0``.
  16. .. tabs::
  17. .. code-tab:: gdscript
  18. # Play child animation from the start.
  19. animation_tree.set("parameters/TimeSeek/seek_request", 0.0)
  20. # Alternative syntax (same result as above).
  21. animation_tree["parameters/TimeSeek/seek_request"] = 0.0
  22. # Play child animation from 12 second timestamp.
  23. animation_tree.set("parameters/TimeSeek/seek_request", 12.0)
  24. # Alternative syntax (same result as above).
  25. animation_tree["parameters/TimeSeek/seek_request"] = 12.0
  26. .. code-tab:: csharp
  27. // Play child animation from the start.
  28. animationTree.Set("parameters/TimeSeek/seek_request", 0.0);
  29. // Play child animation from 12 second timestamp.
  30. animationTree.Set("parameters/TimeSeek/seek_request", 12.0);
  31. .. rst-class:: classref-introduction-group
  32. Tutorials
  33. ---------
  34. - :doc:`Using AnimationTree <../tutorials/animation/animation_tree>`
  35. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  36. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  37. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  38. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  39. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  40. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  41. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`