diff --git a/Assets/Data/Items/SoundBirdPuzzleItems/BurgerBuns.asset b/Assets/Data/Items/SoundBirdPuzzleItems/BurgerBuns.asset index d121ae16..a8eb6268 100644 --- a/Assets/Data/Items/SoundBirdPuzzleItems/BurgerBuns.asset +++ b/Assets/Data/Items/SoundBirdPuzzleItems/BurgerBuns.asset @@ -17,3 +17,5 @@ MonoBehaviour: description: A pack of Burguer Buns, they need to be combined with the headband to get "Bunfflers" mapSprite: {fileID: 7029408211075050325, guid: 00637ce2d8f2923419b6ed4e91792dc0, type: 3} + pickUpSound: {fileID: 6418180475301049370, guid: ee2166600ebe2b84ea8b22d20e34a691, type: 2} + dropSound: {fileID: 6418180475301049370, guid: ee2166600ebe2b84ea8b22d20e34a691, type: 2} diff --git a/Assets/Scenes/Levels/Quarry.unity b/Assets/Scenes/Levels/Quarry.unity index 5503d9a6..80ea7348 100644 --- a/Assets/Scenes/Levels/Quarry.unity +++ b/Assets/Scenes/Levels/Quarry.unity @@ -456869,6 +456869,10 @@ PrefabInstance: propertyPath: m_LocalPosition.y value: -0.1 objectReference: {fileID: 0} + - target: {fileID: 2694056030225760361, guid: ae9b91dd59f66a348a8c888106aa0815, type: 3} + propertyPath: pickupAudio + value: + objectReference: {fileID: 6418180475301049370, guid: ee2166600ebe2b84ea8b22d20e34a691, type: 2} - target: {fileID: 2790478271624144664, guid: ae9b91dd59f66a348a8c888106aa0815, type: 3} propertyPath: m_SortingOrder value: 1 diff --git a/Assets/Scripts/Interactions/PickupItemData.cs b/Assets/Scripts/Interactions/PickupItemData.cs index 5665e3ae..7cdab7bf 100644 --- a/Assets/Scripts/Interactions/PickupItemData.cs +++ b/Assets/Scripts/Interactions/PickupItemData.cs @@ -1,6 +1,7 @@ using UnityEngine; using System.Collections.Generic; using System; +using UnityEngine.Audio; [CreateAssetMenu(fileName = "PickupItemData", menuName = "AppleHills/Items + Puzzles/Pickup Item Data")] public class PickupItemData : ScriptableObject @@ -11,6 +12,8 @@ public class PickupItemData : ScriptableObject [TextArea] public string description; public Sprite mapSprite; + public AudioResource pickUpSound; + public AudioResource dropSound; // Read-only property for itemId public string itemId => _itemId; diff --git a/Assets/Scripts/Sound/PulverAudioController.cs b/Assets/Scripts/Sound/PulverAudioController.cs index 6eee1f89..acba2b8a 100644 --- a/Assets/Scripts/Sound/PulverAudioController.cs +++ b/Assets/Scripts/Sound/PulverAudioController.cs @@ -1,3 +1,4 @@ +using Core; using UnityEngine; using UnityEngine.Audio; @@ -6,6 +7,7 @@ public class PulverAudioController : MonoBehaviour private AppleAudioSource audioSource; public AudioResource combineAudio; private FollowerController followerController; + public ItemManager itemManager; // Start is called once before the first execution of Update after the MonoBehaviour is created void Start() @@ -13,7 +15,7 @@ public class PulverAudioController : MonoBehaviour audioSource = GetComponent(); followerController = GetComponent(); followerController.PulverIsCombining.AddListener(PulverIsCombining); - + } void PulverIsCombining() @@ -22,5 +24,10 @@ public class PulverAudioController : MonoBehaviour audioSource.Play(0); } + void ItemPickedUp(PickupItemData itemData) + { + + } + }