midori-school/levels/ui/debug.gd

67 lines
1.9 KiB
GDScript3
Raw Normal View History

2024-01-16 03:05:25 +01:00
extends Control
2024-09-07 18:25:58 +02:00
const gamepadtest = preload("res://gamepad.gd")
2024-01-16 03:05:25 +01:00
func _ready():
2024-05-19 21:12:02 +02:00
_statrebase()
2024-09-07 18:25:58 +02:00
#Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN)
2024-01-16 13:58:17 +01:00
Global.debug = true
2024-01-27 05:38:12 +01:00
$"VBoxContainer/Gamepad Test".grab_focus()
2024-01-16 03:05:25 +01:00
# 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.
get_tree().change_scene_to_file("res://backgounds/disclaimer.tscn")
#Global.live = 1
#Global.gamelevel = randi() % 3
#if Global.gamelevel == 0:
# get_tree().change_scene_to_file("res://backgounds/galaxy.tscn")
#elif Global.gamelevel == 1:
# get_tree().change_scene_to_file("res://backgounds/wormhole.tscn")
#else:
# get_tree().change_scene_to_file("res://backgounds/abstract.tscn")
#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-01-16 03:05:25 +01:00
# Mouse in viewport coordinates.
2024-01-16 13:58:17 +01:00
if Input.is_action_just_pressed("ui_cancel"):
2024-01-16 03:05:25 +01:00
_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_scene_selector_pressed():
2024-01-20 11:38:12 +01:00
get_tree().change_scene_to_file("res://levels/ui/scene.tscn")
2024-01-16 03:05:25 +01:00
func _on_sound_test_pressed():
2024-01-20 11:38:12 +01:00
get_tree().change_scene_to_file("res://levels/ui/soundtest.tscn")
2024-01-16 03:05:25 +01:00
func _on_back_pressed():
2024-01-16 13:58:17 +01:00
Global.debug = false
2024-09-26 02:43:45 +02:00
get_tree().change_scene_to_file("res://levels/ui/settings.tscn")
2024-01-27 05:38:12 +01:00
func _on_gamepad_test_pressed():
get_tree().change_scene_to_file("res://levels/ui/gamepadtest.tscn")
2024-05-19 21:12:02 +02:00
func _statrebase():
for i in 4:
if Global.dparty[i][0] != null:
for j in 7:
Global.dstats[Global.dparty[i][0]][j] = Global.basestats[Global.dparty[i][0]][j] * Global.dlevel[Global.dparty[i][0]]