forked from team-sg/hero-mark-2
step two to squa
This commit is contained in:
parent
69df2d6ce4
commit
fcfaec94a6
2 changed files with 17 additions and 0 deletions
|
@ -130,3 +130,7 @@ func great_job():
|
||||||
if r > 30 && r <= 60: play_sound(a_great_job_haze,ac_shard)
|
if r > 30 && r <= 60: play_sound(a_great_job_haze,ac_shard)
|
||||||
if r > 60 && r <= 90: play_sound(a_great_job_ivy,ac_shard)
|
if r > 60 && r <= 90: play_sound(a_great_job_ivy,ac_shard)
|
||||||
if r > 90: play_sound(a_great_job_dog,ac_shard)
|
if r > 90: play_sound(a_great_job_dog,ac_shard)
|
||||||
|
|
||||||
|
func pause_all(paused: bool) -> void:
|
||||||
|
for player in get_children():
|
||||||
|
player.stream_paused = paused
|
||||||
|
|
|
@ -37,12 +37,14 @@ func _on_cutscene_finished() -> void:
|
||||||
|
|
||||||
func fade() -> void:
|
func fade() -> void:
|
||||||
Fade.fade_out(0.4)
|
Fade.fade_out(0.4)
|
||||||
|
Game.can_pause = true
|
||||||
yield(Fade, "fade_finished")
|
yield(Fade, "fade_finished")
|
||||||
sg2083.anims.play("force idle")
|
sg2083.anims.play("force idle")
|
||||||
Fade.fade_in(0.4)
|
Fade.fade_in(0.4)
|
||||||
$"%GUI".visible = true
|
$"%GUI".visible = true
|
||||||
yield(Fade, "fade_finished")
|
yield(Fade, "fade_finished")
|
||||||
sg2083.state = sg2083.State.STAND
|
sg2083.state = sg2083.State.STAND
|
||||||
|
$FamiCutscene.queue_free()
|
||||||
Game.can_pause = true
|
Game.can_pause = true
|
||||||
Game.can_restart = true
|
Game.can_restart = true
|
||||||
famira.state_chart.send_event("transformed")
|
famira.state_chart.send_event("transformed")
|
||||||
|
@ -83,3 +85,14 @@ func _on_death_cooldown() -> void:
|
||||||
Game.change_map(LevelData.levels[Game.current_level].scene)
|
Game.change_map(LevelData.levels[Game.current_level].scene)
|
||||||
else:
|
else:
|
||||||
Game.change_map(load("res://cutscenes/ending_future.tscn"))
|
Game.change_map(load("res://cutscenes/ending_future.tscn"))
|
||||||
|
|
||||||
|
func _notification(what: int) -> void:
|
||||||
|
match what:
|
||||||
|
NOTIFICATION_WM_FOCUS_OUT:
|
||||||
|
if !Game.can_pause:
|
||||||
|
Audio.pause_all(true)
|
||||||
|
get_tree().paused = true
|
||||||
|
NOTIFICATION_WM_FOCUS_IN:
|
||||||
|
if !Game.can_pause:
|
||||||
|
Audio.pause_all(false)
|
||||||
|
get_tree().paused = false
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue