Click or drag to resize

AnimationPlayerPlay Method

Plays the animation with key name. Custom blend times and speed can be set. If custom_speed is negative and from_end is true, the animation will play backwards (which is equivalent to calling PlayBackwards(String, Single)).

The AnimationPlayer keeps track of its current or last played animation with AssignedAnimation. If this method is called with that same animation name, or with no name parameter, the assigned animation will resume playing if it was paused, or restart if it was stopped (see Stop(Boolean) for both pause and stop). If the animation was already playing, it will keep playing.

Note: The animation will be updated the next time the AnimationPlayer is processed. If other variables are updated at the same time this is called, they may be updated too early. To perform the update immediately, call advance(0).

Namespace:  Godot
Assembly:  GodotSharp (in GodotSharp.dll) Version: 1.0.0
Syntax
C#
public void Play(
	string name = "",
	float customBlend = -1f,
	float customSpeed = 1f,
	bool fromEnd = false
)

Parameters

name (Optional)
Type: SystemString

[Missing <param name="name"/> documentation for "M:Godot.AnimationPlayer.Play(System.String,System.Single,System.Single,System.Boolean)"]

customBlend (Optional)
Type: SystemSingle

[Missing <param name="customBlend"/> documentation for "M:Godot.AnimationPlayer.Play(System.String,System.Single,System.Single,System.Boolean)"]

customSpeed (Optional)
Type: SystemSingle

[Missing <param name="customSpeed"/> documentation for "M:Godot.AnimationPlayer.Play(System.String,System.Single,System.Single,System.Boolean)"]

fromEnd (Optional)
Type: SystemBoolean

[Missing <param name="fromEnd"/> documentation for "M:Godot.AnimationPlayer.Play(System.String,System.Single,System.Single,System.Boolean)"]

See Also