-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnode_2d.gd
More file actions
27 lines (22 loc) · 706 Bytes
/
node_2d.gd
File metadata and controls
27 lines (22 loc) · 706 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
extends Node2D
func updateTrophies():
if Global.beatenlevels >= 1:
$one.show()
if Global.beatenlevels >= 2:
$two.show()
if Global.beatenlevels >= 3:
$three.show()
$return2.show()
func _ready():
$Panel / AnimationPlayer.play("fadein")
updateTrophies()
print(Global.beatenlevels)
func _on_return_pressed() -> void :
$Uirelease.play()
get_tree().change_scene_to_file("res://worldmap.tscn")
func _on_return_button_down() -> void :
$Uipress.play()
func _on_return_mouse_entered() -> void :
$Uihover.play()
func _on_return_2_pressed() -> void :
get_tree().change_scene_to_file("res://credits.tscn")