Add a levelup sound
This commit is contained in:
@@ -646,6 +646,7 @@ public class GamePlayer : MonoBehaviour
|
||||
|
||||
void UpdateStats(BigInteger scoreAddAmount, BigInteger attemptAddAmount)
|
||||
{
|
||||
var levelBefore = Tools.GetLevelInfo().level;
|
||||
var prefix = "";
|
||||
var suffix = "";
|
||||
score += scoreAddAmount;
|
||||
@@ -678,6 +679,7 @@ public class GamePlayer : MonoBehaviour
|
||||
DiscordRPCHandler.Instance.UpdateRPC("Playing in normal mode", $"Score: {Tools.FormatWithCommas(score)} | High Score: {Tools.FormatWithCommas(highscore)}");
|
||||
var (_, level, currentXpInLevel, totalXpForLevel, percentDone) = Tools.GetLevelInfo();
|
||||
levelText.text = $"Level: {Tools.FormatWithCommas(level.ToString())}" + (Application.isMobilePlatform ? " \\u2022 " : "\n") + $"XP: {Tools.FormatWithCommas(currentXpInLevel.ToString())}/{Tools.FormatWithCommas(totalXpForLevel.ToString())} ({Math.Floor(percentDone)}%)";
|
||||
if (level != levelBefore) AudioSource.PlayClipAtPoint(Resources.Load<AudioClip>("Sounds/Levelup"), Camera.main.transform.position, 1f * BazookaManager.Instance.GetSettingSFXVolume());
|
||||
}
|
||||
|
||||
void CheckIfGrounded()
|
||||
|
||||
Reference in New Issue
Block a user