test level
This commit is contained in:
parent
dc061b2dea
commit
c207a8be65
10 changed files with 152 additions and 41 deletions
|
@ -55,6 +55,26 @@ func _input(event):
|
|||
get_tree().change_scene_to_file("res://levels/ui/scene.tscn")
|
||||
else:
|
||||
get_tree().change_scene_to_file("res://title.tscn")
|
||||
if Input.is_action_just_pressed("ui_accept"):
|
||||
if Global.cutscenes[Global.ccutscene][3]:
|
||||
get_tree().root.remove_child(bhud)
|
||||
get_tree().root.remove_child(level)
|
||||
bgsound.stop()
|
||||
if Global.debug:
|
||||
get_tree().change_scene_to_file("res://levels/ui/scene.tscn")
|
||||
else:
|
||||
get_tree().change_scene_to_file(Global.cutscenes[Global.ccutscene][1])
|
||||
else:
|
||||
Global.ccutscene += 1
|
||||
get_tree().root.remove_child(level)
|
||||
level = load(Global.cutscenes[Global.ccutscene][0]).instantiate()
|
||||
if musictrack != Global.cutscenes[Global.ccutscene][2]:
|
||||
bgsound.stop()
|
||||
musictrack = Global.cutscenes[Global.ccutscene][2]
|
||||
music = load(musictrack)
|
||||
bgsound.stream = music
|
||||
bgsound.play(0)
|
||||
get_tree().root.add_child.call_deferred(level)
|
||||
#if (Global.live == 1 && (Input.is_key_pressed(KEY_V) && Input.is_key_pressed(KEY_UP)) ||(Input.is_joy_button_pressed(0,JOY_BUTTON_RIGHT_SHOULDER) && Input.is_joy_button_pressed(0,JOY_BUTTON_DPAD_UP))):
|
||||
# if Global.debug:
|
||||
# if Global.dparty[0][0] != null:
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
extends Control
|
||||
func _ready():
|
||||
_statrebase()
|
||||
Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN)
|
||||
Global.debug = true
|
||||
$"VBoxContainer/Gamepad Test".grab_focus()
|
||||
|
@ -55,3 +56,9 @@ func _on_back_pressed():
|
|||
|
||||
func _on_gamepad_test_pressed():
|
||||
get_tree().change_scene_to_file("res://levels/ui/gamepadtest.tscn")
|
||||
|
||||
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]]
|
||||
|
|
|
@ -46,17 +46,28 @@ func _on_exit_pressed():
|
|||
|
||||
|
||||
func _on_noob_pressed():
|
||||
_statrebase()
|
||||
Global.dificulty = 1
|
||||
Global.cplace = [1, 11, 19]
|
||||
Global.live = 1
|
||||
Global.cpchar = 0
|
||||
Global.party = [[0,0], [null,null], [null,null], [null,null]]
|
||||
get_tree().change_scene_to_file("res://levels/ui/gameplay.tscn")
|
||||
pass # Replace with function body.
|
||||
Global.ccutscene = 0
|
||||
get_tree().change_scene_to_file("res://levels/ui/Cutscenes.tscn")
|
||||
#pass # Replace with function body.
|
||||
|
||||
|
||||
func _on_thisfirst_pressed():
|
||||
pass # Replace with function body.
|
||||
_statrebase()
|
||||
Global.dificulty = 2
|
||||
Global.cplace = [1, 11, 19]
|
||||
Global.live = 1
|
||||
Global.cpchar = 0
|
||||
Global.party = [[0,0], [null,null], [null,null], [null,null]]
|
||||
Global.ccutscene = 0
|
||||
get_tree().change_scene_to_file("res://levels/ui/Cutscenes.tscn")
|
||||
#pass # Replace with function body.
|
||||
|
||||
|
||||
|
||||
func _on_challenge_pressed():
|
||||
|
@ -65,3 +76,10 @@ func _on_challenge_pressed():
|
|||
|
||||
func _on_maniac_pressed():
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
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]]
|
||||
|
|
|
@ -26,9 +26,9 @@ func _level():
|
|||
func _input(event):
|
||||
if Input.is_action_just_pressed("ui_cancel"):
|
||||
get_tree().change_scene_to_file("res://title.tscn")
|
||||
# Mouse in viewport coordinates.
|
||||
# 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)
|
||||
# print("Mouse Click/Unclick at: ", event.position)
|
||||
# if highlighted == 1:
|
||||
# _on_debug_pressed()
|
||||
# if highlighted == 2:
|
||||
|
@ -40,7 +40,8 @@ func _input(event):
|
|||
|
||||
|
||||
func _on_start_pressed():
|
||||
_level()
|
||||
get_tree().change_scene_to_file("res://levels/ui/newgame.tscn")
|
||||
#_level()
|
||||
#pass # Replace with function body.
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue