Godot - Run multiple animations simultaneously with Tween
Code example to run multiple animations simultaneously with Tween in GDScript.
Code example to run multiple animations simultaneously with Tween.
Create a new Tween with create_tween()
, and enable simultaneous execution by specifying "true" as argument for set_parallel()
.set_parallel()
also enables with no arguments.
var tween = create_tween().set_parallel(true)
tween.tween_property(self, "scale", Vector2(5, 5), 1.0)
tween.tween_property(self, "modulate", Color( 1, 1, 1, 0), 1.0)
tween.play()
To return to sequential execution after enabling set_parallel()
, specify "false" in set_parallel()
or specify chain()
function for target Tween.
var tween = create_tween().set_parallel(true)
tween.tween_property(self, "scale", Vector2(5, 5), 1.0)
tween.tween_property(self, "modulate", Color( 1, 1, 1, 0), 1.0)
tween.set_parallel(false)
# tween.chain()
tween.tween_property(self, "modulate", Color( 1, 1, 1, 1), 1.0)
tween.play()
TitleGodot - Run multiple animations simultaneously with Tween
CategoryGodot
Created
Update
AuthorYousuke.U