diff --git a/Assets/Audio/Music/nightmare.mp3 b/Assets/Audio/Music/nightmare.mp3 new file mode 100644 index 0000000000000000000000000000000000000000..9a78c2a984e45ba5621f6ca304f507ae44929f33 --- /dev/null +++ b/Assets/Audio/Music/nightmare.mp3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3fb6580d31e3203d1eded6d50e491b0f9308251cdda1d8c63e205449737aaf3f +size 1158720 diff --git a/Assets/Audio/Music/nightmare.mp3.meta b/Assets/Audio/Music/nightmare.mp3.meta new file mode 100644 index 0000000000000000000000000000000000000000..89939b5526716417428528965967d32450172a77 --- /dev/null +++ b/Assets/Audio/Music/nightmare.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: a4ba6f616e8b24246a6df42d24a3fa87 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/Quest.unity b/Assets/Scenes/Quest.unity index f7099db2c76d280e771b49e39bc8a4e61fe65eac..28c26d073314b4b5ad07d35233b8acb7471feadc 100644 --- a/Assets/Scenes/Quest.unity +++ b/Assets/Scenes/Quest.unity @@ -1393,6 +1393,102 @@ BoxCollider: serializedVersion: 2 m_Size: {x: 3.6037467, y: 4.168286, z: 5.7266064} m_Center: {x: 0, y: 0, z: 0} +--- !u!82 &364803370 +AudioSource: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 364803363} + m_Enabled: 1 + serializedVersion: 4 + OutputAudioMixerGroup: {fileID: 0} + m_audioClip: {fileID: 8300000, guid: a4ba6f616e8b24246a6df42d24a3fa87, type: 3} + m_PlayOnAwake: 0 + m_Volume: 1 + m_Pitch: 1 + Loop: 0 + Mute: 0 + Spatialize: 0 + SpatializePostEffects: 0 + Priority: 128 + DopplerLevel: 1 + MinDistance: 1 + MaxDistance: 500 + Pan2D: 0 + rolloffMode: 0 + BypassEffects: 0 + BypassListenerEffects: 0 + BypassReverbZones: 0 + rolloffCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + panLevelCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + spreadCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + reverbZoneMixCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 --- !u!1 &371216731 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/Boss/ElementalHealth.cs b/Assets/Scripts/Boss/ElementalHealth.cs index aba84924b3b0c69b69fada4c0d84b43103e142ad..1e2edb17c722a28c30009874c9de9fe8cc822fd6 100644 --- a/Assets/Scripts/Boss/ElementalHealth.cs +++ b/Assets/Scripts/Boss/ElementalHealth.cs @@ -2,7 +2,7 @@ using UnityEngine; public class ElementalHealth : MonoBehaviour, IEnemyHealthHandler { - public int startingHealth = 500; + public int startingHealth = 2000; public int currentHealth; public float sinkSpeed = 2.5f; public int scoreValue = 20; diff --git a/Assets/Scripts/Managers/GameControl.cs b/Assets/Scripts/Managers/GameControl.cs index dfbe9d6843788716383ff64dab58c01288966eaa..24e578b847afa1ce30ffe1c388ab487f21751645 100644 --- a/Assets/Scripts/Managers/GameControl.cs +++ b/Assets/Scripts/Managers/GameControl.cs @@ -90,6 +90,8 @@ public class GameControl : MonoBehaviour audioSource.volume = Mathf.Lerp(start, targetVolume, currentTime / duration); yield return null; } + audioSource.volume = Mathf.Lerp(targetVolume, start, 1f); + audioSource.Stop(); Destroy(theGameObject, 2f); yield break; diff --git a/Assets/Scripts/Quest/Temple/Temple.cs b/Assets/Scripts/Quest/Temple/Temple.cs index 8321b7708df7178e76d88c17fd9e512d91a57064..4b8985362819545ec90c4bcbcf8f06390f54e58c 100644 --- a/Assets/Scripts/Quest/Temple/Temple.cs +++ b/Assets/Scripts/Quest/Temple/Temple.cs @@ -9,6 +9,7 @@ public class Temple : MonoBehaviour [SerializeField] private EnemyManager enemyManager; + AudioSource battleAttack; private TimerManager _timer; public TimerManager timer @@ -73,6 +74,7 @@ public class Temple : MonoBehaviour void Start() { Shop.SetActive(false); + battleAttack = GetComponent<AudioSource>(); } // Update is called once per frame @@ -81,7 +83,7 @@ public class Temple : MonoBehaviour var hasTalked = GlobalStateManager.Instance.HasTalked[idxCurrentQuest]; if (playerOnRange && Input.GetKeyDown(KeyCode.G) && hasTalked) { - ToastManager.Instance.ShowToast("ENTERING QUEST",1); + ToastManager.Instance.ShowToast("ENTERING QUEST", 1); EnteringQuest(); } } @@ -89,10 +91,12 @@ public class Temple : MonoBehaviour private void EnteringQuest() { if (onQuest) return; - + battleAttack.volume = GlobalManager.Instance.Volume; + battleAttack.Play(); + Debug.Log("BERAPAKAH SIH INI???" + battleAttack.volume); onQuest = true; questNumberEnemy = QuestConfig.GetNumberEnemy(stepQuests[idxCurrentQuest]).Clone(); - + enemyManager.gameObject.SetActive(true); timer.StartTimer(); } @@ -107,7 +111,7 @@ public class Temple : MonoBehaviour private void ExitingQuest() { StartCoroutine(ShowShop()); - + StartCoroutine(GameControl.control.StartFade(battleAttack, 4f, 0f, null)); var reward = questNumberEnemy.Reward; GameControl.control.addCurrency(reward); timer.StopTimer(); @@ -117,7 +121,7 @@ public class Temple : MonoBehaviour var enemies = FindObjectsOfType<EnemyHealth>(); foreach (var enemy in enemies) { - Debug.Log("Killing"+ enemy); + Debug.Log("Killing" + enemy); enemy.Death(); //Destroy(enemy.gameObject); } @@ -129,7 +133,7 @@ public class Temple : MonoBehaviour // add it to the global time // remove the timer var questTime = timer.TakeTime(); - ToastManager.Instance.ShowToastQueue("Your total time now: " + ToastManager.Instance.ShowToastQueue("Your total time now: " + System.TimeSpan.FromSeconds(GlobalManager.Instance.TotalTime).ToString("mm':'ss") + " + " + System.TimeSpan.FromSeconds(questTime).ToString("mm':'ss"), 2); GlobalManager.Instance.TotalTime += questTime; @@ -156,14 +160,14 @@ public class Temple : MonoBehaviour if (onQuest) { - ToastManager.Instance.ShowToast("- Good Luck with your Quest -",1); + ToastManager.Instance.ShowToast("- Good Luck with your Quest -", 1); } else { ToastManager.Instance.ShowToast("- Press G to Enter Quest " + - (idxCurrentQuest+1) + " - ",1); + (idxCurrentQuest + 1) + " - ", 1); } - } + } } private void OnTriggerExit(Collider other)