Files
AppleHillsProduction/Assets/Scripts/Sound/PulverAudioController.cs

34 lines
805 B
C#
Raw Normal View History

2025-10-31 16:22:48 +01:00
using Core;
2025-10-31 15:45:28 +01:00
using UnityEngine;
using UnityEngine.Audio;
public class PulverAudioController : MonoBehaviour
{
private AppleAudioSource audioSource;
public AudioResource combineAudio;
private FollowerController followerController;
2025-10-31 16:22:48 +01:00
public ItemManager itemManager;
2025-10-31 15:45:28 +01:00
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
audioSource = GetComponent<AppleAudioSource>();
followerController = GetComponent<FollowerController>();
followerController.PulverIsCombining.AddListener(PulverIsCombining);
2025-10-31 16:22:48 +01:00
2025-10-31 15:45:28 +01:00
}
void PulverIsCombining()
{
audioSource.audioSource.resource = combineAudio;
audioSource.Play(0);
}
2025-10-31 16:22:48 +01:00
void ItemPickedUp(PickupItemData itemData)
{
}
2025-10-31 15:45:28 +01:00
}