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;
|
isBreak = false;
|
||||||
|
Audio.PlaySFXOnce2D("event:/Props/impact_break");
|
||||||
Owner.SetActive(false);
|
Owner.SetActive(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -76,33 +76,25 @@ public class GameManager : Script
|
||||||
if(timeText)
|
if(timeText)
|
||||||
timeText.GetComponent<TextRenderable>().Text = $"Time Left: {timer.ToString("0.00")}";
|
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;
|
currGameState = GameState.WIN;
|
||||||
Audio.StopAllSounds();
|
Audio.StopAllSounds();
|
||||||
SceneManager.ChangeScene(winScene);
|
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;
|
currGameState = GameState.LOSE;
|
||||||
Audio.StopAllSounds();
|
Audio.StopAllSounds();
|
||||||
SceneManager.ChangeScene(loseScene);
|
SceneManager.ChangeScene(loseScene);
|
||||||
|
Audio.PlaySFXOnce2D("event:/Music/stingers/game_lose");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Cheats()
|
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))
|
if (Input.GetKeyDown(Input.KeyCode.Escape))
|
||||||
{
|
{
|
||||||
Audio.StopAllSounds();
|
Audio.StopAllSounds();
|
||||||
|
|
Loading…
Reference in New Issue