Documentation
¶
Overview ¶
Package AnimationNodeOneShot provides methods for working with AnimationNodeOneShot object instances.
Index ¶
- type Advanced
- type Any
- type Extension
- func (self *Extension[T]) AsAnimationNode() AnimationNode.Instance
- func (self *Extension[T]) AsAnimationNodeOneShot() Instance
- func (self *Extension[T]) AsAnimationNodeSync() AnimationNodeSync.Instance
- func (self *Extension[T]) AsObject() [1]gd.Object
- func (self *Extension[T]) AsRefCounted() [1]gd.RefCounted
- func (self *Extension[T]) AsResource() Resource.Instance
- type ID
- type Instance
- func (self Instance) AsAnimationNode() AnimationNode.Instance
- func (self Instance) AsAnimationNodeOneShot() Instance
- func (self Instance) AsAnimationNodeSync() AnimationNodeSync.Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsRefCounted() [1]gd.RefCounted
- func (self Instance) AsResource() Resource.Instance
- func (self Instance) Autorestart() bool
- func (self Instance) AutorestartDelay() Float.X
- func (self Instance) AutorestartRandomDelay() Float.X
- func (self Instance) BreakLoopAtEnd() bool
- func (self Instance) FadeinCurve() Curve.Instance
- func (self Instance) FadeinTime() Float.X
- func (self Instance) FadeoutCurve() Curve.Instance
- func (self Instance) FadeoutTime() Float.X
- func (self Instance) ID() ID
- func (self Instance) MixMode() MixMode
- func (self Instance) SetAutorestart(value bool)
- func (self Instance) SetAutorestartDelay(value Float.X)
- func (self Instance) SetAutorestartRandomDelay(value Float.X)
- func (self Instance) SetBreakLoopAtEnd(value bool)
- func (self Instance) SetFadeinCurve(value Curve.Instance)
- func (self Instance) SetFadeinTime(value Float.X)
- func (self Instance) SetFadeoutCurve(value Curve.Instance)
- func (self Instance) SetFadeoutTime(value Float.X)
- func (self Instance) SetMixMode(value MixMode)
- func (self *Instance) SetObject(obj [1]gd.Object) bool
- func (self Instance) Virtual(name string) reflect.Value
- type MixMode
- type OneShotRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Advanced ¶
type Advanced = class
Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.
type Extension ¶
Extension can be embedded in a new struct to create an extension of this class. T should be the type that is embedding this Extension
func (*Extension[T]) AsAnimationNode ¶
func (self *Extension[T]) AsAnimationNode() AnimationNode.Instance
func (*Extension[T]) AsAnimationNodeOneShot ¶
func (*Extension[T]) AsAnimationNodeSync ¶
func (self *Extension[T]) AsAnimationNodeSync() AnimationNodeSync.Instance
func (*Extension[T]) AsRefCounted ¶
func (self *Extension[T]) AsRefCounted() [1]gd.RefCounted
func (*Extension[T]) AsResource ¶
type ID ¶
ID is a typed object ID (reference) to an instance of this class, use it to store references to objects with unknown lifetimes, as an ID will not panic on use if the underlying object has been destroyed.
type Instance ¶
type Instance [1]gdclass.AnimationNodeOneShot
A resource to add to an [AnimationNodeBlendTree]. This animation node will execute a sub-animation and return once it finishes. Blend times for fading in and out can be customized, as well as filters. After setting the request and changing the animation playback, the one-shot node automatically clears the request on the next process frame by setting its [code]request[/code] value to [constant ONE_SHOT_REQUEST_NONE]. [codeblocks] [gdscript] # Play child animation connected to "shot" port. animation_tree.set("parameters/OneShot/request", AnimationNodeOneShot.ONE_SHOT_REQUEST_FIRE) # Alternative syntax (same result as above). animation_tree["parameters/OneShot/request"] = AnimationNodeOneShot.ONE_SHOT_REQUEST_FIRE
# Abort child animation connected to "shot" port. animation_tree.set("parameters/OneShot/request", AnimationNodeOneShot.ONE_SHOT_REQUEST_ABORT) # Alternative syntax (same result as above). animation_tree["parameters/OneShot/request"] = AnimationNodeOneShot.ONE_SHOT_REQUEST_ABORT
# Abort child animation with fading out connected to "shot" port. animation_tree.set("parameters/OneShot/request", AnimationNodeOneShot.ONE_SHOT_REQUEST_FADE_OUT) # Alternative syntax (same result as above). animation_tree["parameters/OneShot/request"] = AnimationNodeOneShot.ONE_SHOT_REQUEST_FADE_OUT
# Get current state (read-only). animation_tree.get("parameters/OneShot/active") # Alternative syntax (same result as above). animation_tree["parameters/OneShot/active"]
# Get current internal state (read-only). animation_tree.get("parameters/OneShot/internal_active") # Alternative syntax (same result as above). animation_tree["parameters/OneShot/internal_active"] [/gdscript] [csharp] // Play child animation connected to "shot" port. animationTree.Set("parameters/OneShot/request", (int)AnimationNodeOneShot.OneShotRequest.Fire);
// Abort child animation connected to "shot" port. animationTree.Set("parameters/OneShot/request", (int)AnimationNodeOneShot.OneShotRequest.Abort);
// Abort child animation with fading out connected to "shot" port. animationTree.Set("parameters/OneShot/request", (int)AnimationNodeOneShot.OneShotRequest.FadeOut);
// Get current state (read-only). animationTree.Get("parameters/OneShot/active");
// Get current internal state (read-only). animationTree.Get("parameters/OneShot/internal_active"); [/csharp] [/codeblocks]
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func (Instance) AsAnimationNode ¶
func (self Instance) AsAnimationNode() AnimationNode.Instance
func (Instance) AsAnimationNodeOneShot ¶
func (Instance) AsAnimationNodeSync ¶
func (self Instance) AsAnimationNodeSync() AnimationNodeSync.Instance
func (Instance) AsRefCounted ¶
func (self Instance) AsRefCounted() [1]gd.RefCounted
func (Instance) AsResource ¶
func (Instance) Autorestart ¶
func (Instance) AutorestartDelay ¶
func (Instance) AutorestartRandomDelay ¶
func (Instance) BreakLoopAtEnd ¶
func (Instance) FadeinCurve ¶
func (Instance) FadeinTime ¶
func (Instance) FadeoutCurve ¶
func (Instance) FadeoutTime ¶
func (Instance) SetAutorestart ¶
func (Instance) SetAutorestartDelay ¶
func (Instance) SetAutorestartRandomDelay ¶
func (Instance) SetBreakLoopAtEnd ¶
func (Instance) SetFadeinCurve ¶
func (Instance) SetFadeinTime ¶
func (Instance) SetFadeoutCurve ¶
func (Instance) SetFadeoutTime ¶
func (Instance) SetMixMode ¶
type OneShotRequest ¶
type OneShotRequest int //gd:AnimationNodeOneShot.OneShotRequest
const ( /*The default state of the request. Nothing is done.*/ OneShotRequestNone OneShotRequest = 0 /*The request to play the animation connected to "shot" port.*/ OneShotRequestFire OneShotRequest = 1 /*The request to stop the animation connected to "shot" port.*/ OneShotRequestAbort OneShotRequest = 2 /*The request to fade out the animation connected to "shot" port.*/ OneShotRequestFadeOut OneShotRequest = 3 )