Files
puzzle-quest/scripts/Event.gd
T

34 lines
858 B
GDScript
Raw Normal View History

2021-06-03 22:18:50 +02:00
extends Node
## Events for loading scene
####
func _loading_is_started(_anim_name):
print("[Event#_loading_is_started]")
Global.loaded = false
func _loading_is_finished(_anim_name):
print("[Evenst#_loading_is_finished]")
Global.loaded = true
2021-06-05 14:11:47 +02:00
# Events for load scene level
2021-06-03 22:18:50 +02:00
####
func _on_warcraft_pressed():
Global.current_scene_int = 0
Global.goto_scene("res://scenes/levels/warcraft/WarCraft.tscn")
2021-06-04 17:54:23 +02:00
func _on_home_pressed():
Global.current_scene_int = 1
Global.goto_scene("res://scenes/levels/home/Home.tscn")
2021-06-03 22:18:50 +02:00
func _on_reset_level(level, node, index, parent):
Global.current_scene_int = index
level.reset()
2021-06-06 16:54:38 +02:00
parent.configure_reset(level, node, index, true)
2021-06-03 22:18:50 +02:00
parent.configure_counter(level, node)
Global.current_scene_int = null
2021-06-05 14:11:47 +02:00
# Events for back to main scene
####
func _on_main_scene_pressed():
Global.goto_scene("res://scenes/Main.tscn")