Add a levelup sound
This commit is contained in:
BIN
Assets/Resources/Sounds/Levelup.mp3
Normal file
BIN
Assets/Resources/Sounds/Levelup.mp3
Normal file
Binary file not shown.
23
Assets/Resources/Sounds/Levelup.mp3.meta
Normal file
23
Assets/Resources/Sounds/Levelup.mp3.meta
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 87fd15c93c1b9461e934061d65ad617c
|
||||||
|
AudioImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 8
|
||||||
|
defaultSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
loadType: 2
|
||||||
|
sampleRateSetting: 1
|
||||||
|
sampleRateOverride: 44100
|
||||||
|
compressionFormat: 1
|
||||||
|
quality: 0.79999995
|
||||||
|
conversionMode: 0
|
||||||
|
preloadAudioData: 0
|
||||||
|
platformSettingOverrides: {}
|
||||||
|
forceToMono: 0
|
||||||
|
normalize: 1
|
||||||
|
loadInBackground: 0
|
||||||
|
ambisonic: 0
|
||||||
|
3D: 1
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -646,6 +646,7 @@ public class GamePlayer : MonoBehaviour
|
|||||||
|
|
||||||
void UpdateStats(BigInteger scoreAddAmount, BigInteger attemptAddAmount)
|
void UpdateStats(BigInteger scoreAddAmount, BigInteger attemptAddAmount)
|
||||||
{
|
{
|
||||||
|
var levelBefore = Tools.GetLevelInfo().level;
|
||||||
var prefix = "";
|
var prefix = "";
|
||||||
var suffix = "";
|
var suffix = "";
|
||||||
score += scoreAddAmount;
|
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)}");
|
DiscordRPCHandler.Instance.UpdateRPC("Playing in normal mode", $"Score: {Tools.FormatWithCommas(score)} | High Score: {Tools.FormatWithCommas(highscore)}");
|
||||||
var (_, level, currentXpInLevel, totalXpForLevel, percentDone) = Tools.GetLevelInfo();
|
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)}%)";
|
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()
|
void CheckIfGrounded()
|
||||||
|
|||||||
Reference in New Issue
Block a user