Updated Audio and Scene along with bug fixes #285
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -59,6 +59,7 @@ public class Breakable : Script
|
|||
}
|
||||
|
||||
isBreak = false;
|
||||
Audio.PlaySFXOnce2D("event:/Props/impact_break");
|
||||
Owner.SetActive(false);
|
||||
}
|
||||
}
|
|
@ -76,33 +76,25 @@ public class GameManager : Script
|
|||
if(timeText)
|
||||
timeText.GetComponent<TextRenderable>().Text = $"Time Left: {timer.ToString("0.00")}";
|
||||
|
||||
if (timer > 0 && totalItemCount <= 0)
|
||||
if ((timer > 0 && totalItemCount <= 0) || Input.GetKeyDown(Input.KeyCode.F1))
|
||||
{
|
||||
currGameState = GameState.WIN;
|
||||
Audio.StopAllSounds();
|
||||
SceneManager.ChangeScene(winScene);
|
||||
Audio.PlaySFXOnce2D("event:/Music/stingers/game_win");
|
||||
}
|
||||
else if(timer < 0)
|
||||
else if(timer < 0 || Input.GetKeyDown(Input.KeyCode.F2))
|
||||
{
|
||||
currGameState = GameState.LOSE;
|
||||
Audio.StopAllSounds();
|
||||
SceneManager.ChangeScene(loseScene);
|
||||
Audio.PlaySFXOnce2D("event:/Music/stingers/game_lose");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void Cheats()
|
||||
{
|
||||
if (Input.GetKeyDown(Input.KeyCode.F1))
|
||||
{
|
||||
Audio.StopAllSounds();
|
||||
SceneManager.ChangeScene(loseScene);
|
||||
}
|
||||
if (Input.GetKeyDown(Input.KeyCode.F2))
|
||||
{
|
||||
Audio.StopAllSounds();
|
||||
SceneManager.ChangeScene(winScene);
|
||||
}
|
||||
if (Input.GetKeyDown(Input.KeyCode.Escape))
|
||||
{
|
||||
Audio.StopAllSounds();
|
||||
|
|
Loading…
Reference in New Issue