extends Sprite func _ready(): for i in 10000: # $Tween.interpolate_property(self, "region_rect:position:y", region_rect.position.y, region_rect.position.y-200, 1, Tween.TRANS_CIRC, Tween.EASE_OUT) # $Tween.interpolate_property($ForkAbove, "region_rect:position:y", 410, 200, 1, Tween.TRANS_CIRC, Tween.EASE_OUT) # $Tween.start() # yield($Tween,"tween_completed") $Tween.interpolate_property(self, "region_rect:position:y", -500, 0, 1.5, Tween.TRANS_CIRC, Tween.EASE_OUT) $Tween.interpolate_property($ForkAbove, "region_rect:position:y", -90, 410, 1.5, Tween.TRANS_CIRC, Tween.EASE_OUT) $Tween.start() yield($Tween,"tween_completed") region_rect.position.y = 0 $ForkAbove.region_rect.position.y = 410 # $AnimationPlayer.play("Stab") # rotateTween.interpolate_property( # rotateTween is the name of the Tween node. This is telling Godot to create a new animation using this Tween node object. # hexagonTile, # hexagonTile is the 3D tile we want to animate. # "rotation_degrees:y", # When the Tween runs its animation, we will change the Y value on the tile's rotation. # rotation_degrees.y, # When the Tween runs its animation, it will start at the tile's current rotation. # rotation_degrees.y+60 # When the Tween runs its animation, it will end at 60 degrees clockwise from the tile's last rotation. # 0.25, # This is the amount of time in seconds you want the Tween to run the animation for. This means that on the first run, # # the Tween's animation will rotate the tile from 0 degrees to 60 degrees in 1/4 of a second. # Tween.TRANS_BACK, # This is the animations's "TransitionType". I'll talk about this in the next section. # Tween.EASE_OUT # This is the animation's "EaseType". I'll talk about this in the next section. #) #func _rewind(): # $AnimationPlayer.play_backwards("Stab")