mirror of
https://github.com/creyD/ludum_dare_46.git
synced 2026-06-14 22:32:24 +02:00
Include lose screen logic
This commit is contained in:
@@ -923,6 +923,7 @@ script = ExtResource( 4 )
|
|||||||
__meta__ = {
|
__meta__ = {
|
||||||
"_edit_group_": true
|
"_edit_group_": true
|
||||||
}
|
}
|
||||||
|
lose_screen = "res://Menus/LoseScreen/LoseScreen.tscn"
|
||||||
|
|
||||||
[node name="Kind" parent="." instance=ExtResource( 13 )]
|
[node name="Kind" parent="." instance=ExtResource( 13 )]
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,9 @@ var sequence_cycles = 0
|
|||||||
enum PHASES {PHASE_ONE, PHASE_TWO, PHASE_THREE}
|
enum PHASES {PHASE_ONE, PHASE_TWO, PHASE_THREE}
|
||||||
export(PHASES) var _phase = PHASES.PHASE_ONE
|
export(PHASES) var _phase = PHASES.PHASE_ONE
|
||||||
|
|
||||||
|
export(String, FILE, "*.tscn,*.scn") var lose_screen = ""
|
||||||
|
export(String, FILE, "*.tscn,*.scn") var win_screen = ""
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
print("Hey.")
|
print("Hey.")
|
||||||
_change_phase(_phase)
|
_change_phase(_phase)
|
||||||
@@ -101,6 +104,7 @@ func _decide_on_next_state():
|
|||||||
# Death
|
# Death
|
||||||
if state_active == $States/Die:
|
if state_active == $States/Die:
|
||||||
queue_free()
|
queue_free()
|
||||||
|
get_tree().change_scene(lose_screen)
|
||||||
return $States/Dead
|
return $States/Dead
|
||||||
|
|
||||||
if _phase == PHASES.PHASE_ONE:
|
if _phase == PHASES.PHASE_ONE:
|
||||||
|
|||||||
Reference in New Issue
Block a user