mlpcardgame/Scenes/Loading/ScatterCard.gd

12 lines
370 B
GDScript3
Raw Normal View History

2019-06-01 15:38:26 +00:00
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()