2024-04-23 00:19:53 +02:00
|
|
|
extends Control
|
2024-09-07 18:25:58 +02:00
|
|
|
const gamepadtest = preload("res://gamepad.gd")
|
2024-04-23 00:19:53 +02:00
|
|
|
func _ready():
|
2024-09-07 18:25:58 +02:00
|
|
|
#Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN)
|
2024-04-23 00:19:53 +02:00
|
|
|
$VBoxContainer/Thisfirst.grab_focus()
|
|
|
|
|
|
|
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
|
|
func _process(delta):
|
|
|
|
pass
|
|
|
|
|
|
|
|
func _input(event):
|
2024-09-07 18:25:58 +02:00
|
|
|
gamepadtest.new(event)
|
2024-04-23 00:19:53 +02:00
|
|
|
if Input.is_action_just_pressed("ui_cancel"):
|
|
|
|
get_tree().change_scene_to_file("res://levels/ui/tmenu.tscn")
|
|
|
|
# Mouse in viewport coordinates.
|
|
|
|
# if Input.is_key_pressed(KEY_ENTER) || Input.is_joy_button_pressed(0,JOY_BUTTON_B):
|
|
|
|
#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_exit_pressed():
|
|
|
|
get_tree().change_scene_to_file("res://levels/ui/tmenu.tscn")
|
|
|
|
#pass # Replace with function body.
|
|
|
|
|
|
|
|
|
|
|
|
func _on_noob_pressed():
|
2024-05-19 21:12:02 +02:00
|
|
|
_statrebase()
|
2024-05-11 03:35:07 +02:00
|
|
|
Global.dificulty = 1
|
2024-09-24 02:27:17 +02:00
|
|
|
_reset()
|
2024-05-19 21:12:02 +02:00
|
|
|
get_tree().change_scene_to_file("res://levels/ui/Cutscenes.tscn")
|
|
|
|
#pass # Replace with function body.
|
2024-04-23 00:19:53 +02:00
|
|
|
|
|
|
|
|
|
|
|
func _on_thisfirst_pressed():
|
2024-05-19 21:12:02 +02:00
|
|
|
_statrebase()
|
|
|
|
Global.dificulty = 2
|
2024-09-24 02:27:17 +02:00
|
|
|
_reset()
|
2024-05-19 21:12:02 +02:00
|
|
|
get_tree().change_scene_to_file("res://levels/ui/Cutscenes.tscn")
|
|
|
|
#pass # Replace with function body.
|
|
|
|
|
2024-04-23 00:19:53 +02:00
|
|
|
|
|
|
|
|
|
|
|
func _on_challenge_pressed():
|
|
|
|
pass # Replace with function body.
|
|
|
|
|
|
|
|
|
|
|
|
func _on_maniac_pressed():
|
|
|
|
pass # Replace with function body.
|
2024-05-19 21:12:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
func _statrebase():
|
|
|
|
for i in 4:
|
|
|
|
if Global.party[i][0] != null:
|
|
|
|
for j in 7:
|
|
|
|
Global.cstats[Global.party[i][0]][j] = Global.basestats[Global.party[i][0]][j] * Global.level[Global.dparty[i][0]]
|
2024-09-24 02:27:17 +02:00
|
|
|
|
|
|
|
func _reset():
|
|
|
|
Global.quest = [0, 0, 0, 0, 0, 0]
|
|
|
|
Global.cplace = [1, 11, 19]
|
|
|
|
Global.live = 1
|
|
|
|
Global.cpchar = 0
|
|
|
|
Global.party = [[0,0], [null,null], [null,null], [null,null]]
|
|
|
|
Global.ccutscene = 0
|