change goal animation
This commit is contained in:
parent
d137d205ff
commit
dd05641f18
3 changed files with 52 additions and 19 deletions
|
@ -1,15 +1,11 @@
|
|||
extends Node
|
||||
|
||||
@export var next : PackedScene
|
||||
@export var img : Sprite2D
|
||||
@export var img2 : Sprite2D
|
||||
|
||||
@onready var animation = $AnimationPlayer
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
img.rotate(2 * delta)
|
||||
img2.rotate(1 * delta)
|
||||
|
||||
|
||||
animation.play("portal")
|
||||
|
||||
func _on_body_entered(body: Node2D) -> void:
|
||||
get_tree().change_scene_to_packed(next)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue