12 lines
No EOL
370 B
GDScript
12 lines
No EOL
370 B
GDScript
extends Sprite
|
|
|
|
class_name ScatterCard
|
|
|
|
func tweenTo(targetPos: Vector2, targetRot: float, duration: float = 1.0):
|
|
$Tween.interpolate_property(self, "position",
|
|
position, targetPos, duration,
|
|
Tween.TRANS_CUBIC, Tween.EASE_IN_OUT)
|
|
$Tween.interpolate_property(self, "rotation",
|
|
rotation, targetRot, duration,
|
|
Tween.TRANS_CUBIC, Tween.EASE_IN_OUT)
|
|
$Tween.start() |