level clear
This commit is contained in:
parent
23ce8d32f8
commit
45db4b4f64
11 changed files with 60 additions and 18 deletions
|
@ -58,13 +58,15 @@ func _input(event):
|
|||
get_tree().change_scene_to_file("res://title.tscn")
|
||||
if Input.is_action_just_pressed("ui_accept"):
|
||||
if Global.cutscenes[Global.ccutscene][3]:
|
||||
var ccutscene = Global.ccutscene
|
||||
Global.ccutscene = null
|
||||
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])
|
||||
get_tree().change_scene_to_file(Global.cutscenes[ccutscene][1])
|
||||
else:
|
||||
Global.ccutscene += 1
|
||||
get_tree().root.remove_child(level)
|
||||
|
|
|
@ -53,7 +53,7 @@ func _ready():
|
|||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
var velocity = Vector2.ZERO
|
||||
if Global.live == 6:
|
||||
if Global.live > 4 && Global.live < 9:
|
||||
_exit()
|
||||
#velocity = (Vector2.RIGHT.rotated(rotation) * -100 * Global.xm * delta)-Vector2.UP.rotated(rotation) * -100 * Global.ym * delta
|
||||
|
||||
|
@ -150,8 +150,14 @@ func _exit():
|
|||
# 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 == 7:
|
||||
get_tree().change_scene_to_file("res://backgounds/result.tscn")
|
||||
elif Global.live == 8:
|
||||
get_tree().change_scene_to_file("res://levels/ui/Cutscenes.tscn")
|
||||
elif Global.live == 6:
|
||||
if Global.debug:
|
||||
Global.live = 0
|
||||
get_tree().change_scene_to_file("res://levels/ui/scene.tscn")
|
||||
else:
|
||||
Global.live = 0
|
||||
get_tree().change_scene_to_file("res://title.tscn")
|
||||
|
|
|
@ -42,7 +42,15 @@ func _input(event):
|
|||
isboss = Global.places[Global.dplace[0]][Global.dplace[1]][Global.dplace[2]][2]
|
||||
else:
|
||||
isboss = Global.places[Global.cplace[0]][Global.cplace[1]][Global.cplace[2]][2]
|
||||
if isboss:
|
||||
Global.bossready = true
|
||||
Global.live = 1
|
||||
if Global.live == 0:
|
||||
if isboss:
|
||||
Global.bossready = true
|
||||
Global.live = 1
|
||||
queue_free()
|
||||
elif Global.live == 3:
|
||||
if Global.ccutscene == null:
|
||||
Global.live = 7
|
||||
else:
|
||||
Global.live = 8
|
||||
queue_free()
|
||||
press = false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue