34 lines
805 B
C#
34 lines
805 B
C#
using Core;
|
|
using UnityEngine;
|
|
using UnityEngine.Audio;
|
|
|
|
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()
|
|
{
|
|
audioSource = GetComponent<AppleAudioSource>();
|
|
followerController = GetComponent<FollowerController>();
|
|
followerController.PulverIsCombining.AddListener(PulverIsCombining);
|
|
|
|
}
|
|
|
|
void PulverIsCombining()
|
|
{
|
|
audioSource.audioSource.resource = combineAudio;
|
|
audioSource.Play(0);
|
|
}
|
|
|
|
void ItemPickedUp(PickupItemData itemData)
|
|
{
|
|
|
|
}
|
|
|
|
|
|
}
|