June 2018
Beginner to intermediate
298 pages
7h 38m
English
A tween is a way to interpolate (change gradually) some value over time (from a start value to an end value) using a particular function. For example, you might choose a function that steadily changes the value or one that starts slow but ramps up in speed. Tweening is also sometimes referred to as easing.
When using a Tween node in Godot, you can assign it to alter one or more properties of a node. In this case, you're going to increase the Scale of the coin and also cause it to fade out using the Modulate property.
Add this line to the _ready() function of Coin:
$Tween.interpolate_property($AnimatedSprite, 'scale', $AnimatedSprite.scale, $AnimatedSprite.scale * 3, 0.3, Tween.TRANS_QUAD, Tween.EASE_IN_OUT)
The interpolate_property() ...
Read now
Unlock full access