Skip to content

Simplified Tweens

Valk edited this page Aug 31, 2025 · 6 revisions

Tweening has never been so easy!!! 🦄

new GodotTween(colorRect)
    .SetParallel()
    .Animate("scale", Vector2.One * 2, 2).Elastic()
    .Animate("color", Colors.Green, 2).Sine().EaseIn()
    .Animate("rotation", Mathf.Pi, 2).Elastic().EaseOut();

GodotTween tween = new GodotTween(colorRect)
    .SetAnimatingProp("color")
    .AnimateProp(Colors.Red, 0.5).Sine().EaseIn()
    .Parallel().AnimateProp(Colors.Green, 0.5).Sine().EaseOut()
    .Parallel().Animate("scale", Vector2.One * 2, 0.5).Sine()
    .Callback(() => GD.Print("Finished!"))
    .Loop();

tween.Stop();

Tip

Prefer strongly typed names over strings? Instead of typing for example "scale" do Control.PropertyName.Scale

Clone this wiki locally