midori-school/levels/ui/pause.gd

41 lines
1.5 KiB
GDScript3
Raw Normal View History

2024-06-09 00:09:54 +02:00
extends Control
var cff
var cnf
var chealthf
2024-06-11 23:36:12 +02:00
var clevel
2024-06-09 00:09:54 +02:00
# Called when the node enters the scene tree for the first time.
func _ready():
cff = $CanvasLayer/HBoxContainer/TextureRect
cnf = $CanvasLayer/HBoxContainer/VBoxContainer/Cname
chealthf = $CanvasLayer/HBoxContainer/VBoxContainer/HBoxContainer/Label2
2024-06-11 23:36:12 +02:00
clevel = $CanvasLayer/HBoxContainer/VBoxContainer/HBoxContainer2/Label2
2024-06-15 23:11:43 +02:00
$CanvasLayer/HBoxContainer2/VBoxContainer2/Exit.grab_focus()
2024-06-17 23:08:25 +02:00
_fetchdata()
2024-06-09 00:09:54 +02:00
#pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass
func _input(event):
_fetchdata()
func _fetchdata():
if Global.debug:
cnf.set_text(Global.pcnames[Global.dparty[Global.dcpchar][0]])
cff.texture = load(Global.hudfaces[Global.dparty[Global.dcpchar][0]][Global.dparty[Global.dcpchar][1]])
chealthf.set_text(str(Global.dstats[Global.dparty[Global.dcpchar][0]][0])+"/"+str(Global.mstats[Global.dparty[Global.dcpchar][0]][0]))
2024-06-11 23:36:12 +02:00
clevel.set_text(str(Global.dlevel[Global.dparty[Global.dcpchar][0]]))
2024-06-09 00:09:54 +02:00
else:
cnf.set_text(Global.pcnames[Global.party[Global.cpchar][0]])
cff.texture = load(Global.hudfaces[Global.party[Global.cpchar][0]][Global.party[Global.cpchar][1]])
chealthf.set_text(str(Global.cstats[Global.dparty[Global.cpchar][0]][0])+"/"+str(Global.mstats[Global.dparty[Global.cpchar][0]][0]))
2024-06-11 23:36:12 +02:00
clevel.set_text(str(Global.level[Global.party[Global.cpchar][0]]))
2024-06-15 23:11:43 +02:00
func _on_exit_pressed():
Global.exitgame = true
#pass # Replace with function body.