wip
This commit is contained in:
parent
c9d81729df
commit
ba79524c8d
5 changed files with 45 additions and 13 deletions
|
@ -5,6 +5,7 @@ var time
|
||||||
var origmpos
|
var origmpos
|
||||||
var mousepos
|
var mousepos
|
||||||
var timelimit = 15000
|
var timelimit = 15000
|
||||||
|
var exitgame = false
|
||||||
var wait
|
var wait
|
||||||
var bossready = false
|
var bossready = false
|
||||||
var playerx
|
var playerx
|
||||||
|
|
|
@ -67,19 +67,8 @@ func _process(delta):
|
||||||
#velocity = (Vector2.RIGHT.rotated(rotation) * -100 * Global.xm * delta)-Vector2.UP.rotated(rotation) * -100 * Global.ym * delta
|
#velocity = (Vector2.RIGHT.rotated(rotation) * -100 * Global.xm * delta)-Vector2.UP.rotated(rotation) * -100 * Global.ym * delta
|
||||||
|
|
||||||
func _input(event):
|
func _input(event):
|
||||||
if (Input.is_key_pressed(KEY_ESCAPE) || Input.is_joy_button_pressed(0,JOY_BUTTON_BACK)) && Global.cdialog == []:
|
if Input.is_action_just_pressed("Pause") && Global.cdialog == []:
|
||||||
ishud = false
|
_exit()
|
||||||
Global.bossready = false
|
|
||||||
Global.cboss = [null, null, null]
|
|
||||||
get_tree().root.remove_child(thud)
|
|
||||||
get_tree().root.remove_child(bhud)
|
|
||||||
get_tree().root.remove_child(player)
|
|
||||||
get_tree().root.remove_child(level)
|
|
||||||
Global.live = 0
|
|
||||||
if Global.debug:
|
|
||||||
get_tree().change_scene_to_file("res://levels/ui/scene.tscn")
|
|
||||||
else:
|
|
||||||
get_tree().change_scene_to_file("res://title.tscn")
|
|
||||||
if Global.live == 1 && Input.is_action_pressed("schar") && Input.is_action_just_pressed("ui_up"):
|
if Global.live == 1 && Input.is_action_pressed("schar") && Input.is_action_just_pressed("ui_up"):
|
||||||
if Global.debug:
|
if Global.debug:
|
||||||
if Global.dparty[0][0] != null:
|
if Global.dparty[0][0] != null:
|
||||||
|
@ -130,3 +119,21 @@ func _statrebase():
|
||||||
if Global.party[i][0] != null:
|
if Global.party[i][0] != null:
|
||||||
for j in 7:
|
for j in 7:
|
||||||
Global.mstats[Global.party[i][0]][j] = Global.basestats[Global.party[i][0]][j] * Global.level[Global.dparty[i][0]]
|
Global.mstats[Global.party[i][0]][j] = Global.basestats[Global.party[i][0]][j] * Global.level[Global.dparty[i][0]]
|
||||||
|
func _pausemenu():
|
||||||
|
if Global.live == 4 && !ispaused:
|
||||||
|
get_tree().root.remove_child(bhud)
|
||||||
|
elif Global.live != 4 && ispaused:
|
||||||
|
get_tree().root.add_child.call_deferred(bhud)
|
||||||
|
func _exit():
|
||||||
|
ishud = false
|
||||||
|
Global.bossready = false
|
||||||
|
Global.cboss = [null, null, null]
|
||||||
|
get_tree().root.remove_child(thud)
|
||||||
|
get_tree().root.remove_child(bhud)
|
||||||
|
get_tree().root.remove_child(player)
|
||||||
|
get_tree().root.remove_child(level)
|
||||||
|
Global.live = 0
|
||||||
|
if Global.debug:
|
||||||
|
get_tree().change_scene_to_file("res://levels/ui/scene.tscn")
|
||||||
|
else:
|
||||||
|
get_tree().change_scene_to_file("res://title.tscn")
|
||||||
|
|
|
@ -2,12 +2,14 @@ extends Control
|
||||||
var cff
|
var cff
|
||||||
var cnf
|
var cnf
|
||||||
var chealthf
|
var chealthf
|
||||||
|
var clevel
|
||||||
|
|
||||||
# Called when the node enters the scene tree for the first time.
|
# Called when the node enters the scene tree for the first time.
|
||||||
func _ready():
|
func _ready():
|
||||||
cff = $CanvasLayer/HBoxContainer/TextureRect
|
cff = $CanvasLayer/HBoxContainer/TextureRect
|
||||||
cnf = $CanvasLayer/HBoxContainer/VBoxContainer/Cname
|
cnf = $CanvasLayer/HBoxContainer/VBoxContainer/Cname
|
||||||
chealthf = $CanvasLayer/HBoxContainer/VBoxContainer/HBoxContainer/Label2
|
chealthf = $CanvasLayer/HBoxContainer/VBoxContainer/HBoxContainer/Label2
|
||||||
|
clevel = $CanvasLayer/HBoxContainer/VBoxContainer/HBoxContainer2/Label2
|
||||||
_fetchdata()
|
_fetchdata()
|
||||||
#pass # Replace with function body.
|
#pass # Replace with function body.
|
||||||
|
|
||||||
|
@ -24,7 +26,9 @@ func _fetchdata():
|
||||||
cnf.set_text(Global.pcnames[Global.dparty[Global.dcpchar][0]])
|
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]])
|
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]))
|
chealthf.set_text(str(Global.dstats[Global.dparty[Global.dcpchar][0]][0])+"/"+str(Global.mstats[Global.dparty[Global.dcpchar][0]][0]))
|
||||||
|
clevel.set_text(str(Global.dlevel[Global.dparty[Global.dcpchar][0]]))
|
||||||
else:
|
else:
|
||||||
cnf.set_text(Global.pcnames[Global.party[Global.cpchar][0]])
|
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]])
|
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]))
|
chealthf.set_text(str(Global.cstats[Global.dparty[Global.cpchar][0]][0])+"/"+str(Global.mstats[Global.dparty[Global.cpchar][0]][0]))
|
||||||
|
clevel.set_text(str(Global.level[Global.party[Global.cpchar][0]]))
|
||||||
|
|
|
@ -48,3 +48,17 @@ custom_minimum_size = Vector2(123, 0)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
text = "100/100"
|
text = "100/100"
|
||||||
horizontal_alignment = 2
|
horizontal_alignment = 2
|
||||||
|
|
||||||
|
[node name="HBoxContainer2" type="HBoxContainer" parent="CanvasLayer/HBoxContainer/VBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="CanvasLayer/HBoxContainer/VBoxContainer/HBoxContainer2"]
|
||||||
|
custom_minimum_size = Vector2(70, 0)
|
||||||
|
layout_mode = 2
|
||||||
|
text = "Level"
|
||||||
|
|
||||||
|
[node name="Label2" type="Label" parent="CanvasLayer/HBoxContainer/VBoxContainer/HBoxContainer2"]
|
||||||
|
custom_minimum_size = Vector2(123, 0)
|
||||||
|
layout_mode = 2
|
||||||
|
text = "99"
|
||||||
|
horizontal_alignment = 2
|
||||||
|
|
|
@ -92,6 +92,12 @@ schar={
|
||||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":10,"pressure":0.0,"pressed":false,"script":null)
|
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":10,"pressure":0.0,"pressed":false,"script":null)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
Pause={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194305,"key_label":0,"unicode":0,"echo":false,"script":null)
|
||||||
|
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":4,"pressure":0.0,"pressed":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
[internationalization]
|
[internationalization]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue