TO SQUASH: Code formatting changes.
This commit is contained in:
@@ -21,33 +21,39 @@ public class ScoreChecker : MonoBehaviour
|
||||
|
||||
}
|
||||
|
||||
public void resetFader()
|
||||
public void ResetFader()
|
||||
{
|
||||
Invoke(nameof(checkScore), 0.5f);
|
||||
Invoke(nameof(CheckScore), 0.5f);
|
||||
}
|
||||
|
||||
private IEnumerator PlayAudioThenActivateGameObject(AudioSource audio, bool showGui)
|
||||
{
|
||||
audio.Play();
|
||||
|
||||
if (showGui) {
|
||||
if (showGui)
|
||||
{
|
||||
// Activate your GUI here
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
yield return new WaitUntil(() => audio.time >= audio.clip.length);
|
||||
fadeOut.resetFader();
|
||||
fadeOut.ResetFader();
|
||||
}
|
||||
}
|
||||
|
||||
void checkScore()
|
||||
void CheckScore()
|
||||
{
|
||||
int currentScore = PlayerPrefs.GetInt("CurrentScore");
|
||||
AudioSource audio = null;
|
||||
bool showGui = false;
|
||||
|
||||
if (GameSetup.IsHighScore(currentScore)) {
|
||||
if (GameSetup.IsHighScore(currentScore))
|
||||
{
|
||||
audio = winSound;
|
||||
showGui = true;
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
audio = loseSound;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user