2024-05-12 21:54:52 +02:00
|
|
|
extends Control
|
2024-09-07 18:25:58 +02:00
|
|
|
const gamepadtest = preload("res://gamepad.gd")
|
2024-05-12 21:54:52 +02:00
|
|
|
func _ready():
|
2024-09-07 18:25:58 +02:00
|
|
|
#Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN)
|
2024-05-12 21:54:52 +02:00
|
|
|
$"VBoxContainer/Disclaimer".grab_focus()
|
|
|
|
|
|
|
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
|
|
func _process(delta):
|
|
|
|
pass
|
|
|
|
|
|
|
|
func _level():
|
|
|
|
# This is like autoloading the scene, only
|
|
|
|
# it happens after already loading the main scene.
|
2024-11-07 21:39:59 +01:00
|
|
|
get_tree().change_scene("res://backgounds/disclaimer.tscn")
|
2024-05-12 21:54:52 +02:00
|
|
|
#Global.live = 1
|
|
|
|
#Global.gamelevel = randi() % 3
|
|
|
|
#if Global.gamelevel == 0:
|
2024-11-07 21:39:59 +01:00
|
|
|
# get_tree().change_scene("res://backgounds/galaxy.tscn")
|
2024-05-12 21:54:52 +02:00
|
|
|
#elif Global.gamelevel == 1:
|
2024-11-07 21:39:59 +01:00
|
|
|
# get_tree().change_scene("res://backgounds/wormhole.tscn")
|
2024-05-12 21:54:52 +02:00
|
|
|
#else:
|
2024-11-07 21:39:59 +01:00
|
|
|
# get_tree().change_scene("res://backgounds/abstract.tscn")
|
2024-05-12 21:54:52 +02:00
|
|
|
#get_tree().root.add_child(title)
|
|
|
|
#get_tree().root.remove_child(boot)
|
|
|
|
#boot.queue_free()
|
|
|
|
|
|
|
|
func _input(event):
|
2024-09-07 18:25:58 +02:00
|
|
|
gamepadtest.new(event)
|
2024-05-12 21:54:52 +02:00
|
|
|
# Mouse in viewport coordinates.
|
|
|
|
if Input.is_action_just_pressed("ui_cancel"):
|
|
|
|
_on_back_pressed()
|
|
|
|
#print("Mouse Click/Unclick at: ", event.position)
|
|
|
|
# if highlighted == 1:
|
|
|
|
# _on_debug_pressed()
|
|
|
|
# if highlighted == 2:
|
|
|
|
# _on_exit_pressed()
|
|
|
|
# else:
|
|
|
|
# _on_start_pressed()
|
|
|
|
# elif Input.is_action_pressed("ui_up"):
|
|
|
|
# focus_next
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func _on_back_pressed():
|
2024-11-07 21:39:59 +01:00
|
|
|
get_tree().change_scene("res://levels/ui/debug.tscn")
|
2024-05-12 21:54:52 +02:00
|
|
|
|
|
|
|
func _on_credits_pressed():
|
2024-11-07 21:39:59 +01:00
|
|
|
#get_tree().change_scene("res://levels/ui/credits.tscn")
|
2024-05-12 21:54:52 +02:00
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
func _on_wip_pressed():
|
2024-11-07 21:39:59 +01:00
|
|
|
#get_tree().change_scene("res://backgounds/wip.tscn")
|
2024-05-12 21:54:52 +02:00
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
func _on_results_pressed():
|
2024-11-07 21:39:59 +01:00
|
|
|
#get_tree().change_scene("res://backgounds/result.tscn")
|
2024-09-20 20:28:17 +02:00
|
|
|
Global.ccutscene = 13
|
2024-11-07 21:39:59 +01:00
|
|
|
get_tree().change_scene("res://levels/ui/Cutscenes.tscn")
|
2024-05-12 21:54:52 +02:00
|
|
|
|
|
|
|
|
|
|
|
func _on_disclaimer_pressed():
|
|
|
|
#Global.debug = false
|
|
|
|
Global.ccutscene = 0
|
2024-11-07 21:39:59 +01:00
|
|
|
get_tree().change_scene("res://levels/ui/Cutscenes.tscn")
|
2024-05-12 21:54:52 +02:00
|
|
|
|
|
|
|
|
|
|
|
func _on_testrooms_pressed():
|
2024-08-05 00:33:57 +02:00
|
|
|
#Global.debug = false
|
|
|
|
Global.ccutscene = 6
|
2024-11-07 21:39:59 +01:00
|
|
|
get_tree().change_scene("res://levels/ui/Cutscenes.tscn")
|
2024-05-12 21:54:52 +02:00
|
|
|
|
|
|
|
|
|
|
|
func _on_ceres_pressed():
|
2024-11-07 21:39:59 +01:00
|
|
|
#get_tree().change_scene("res://levels/ui/ceres.tscn")
|
2024-09-20 20:28:17 +02:00
|
|
|
Global.ccutscene = 10
|
2024-11-07 21:39:59 +01:00
|
|
|
get_tree().change_scene("res://levels/ui/Cutscenes.tscn")
|