Worker and secretary audio
This commit is contained in:
@@ -4,6 +4,7 @@ using Pixelplacement;
|
||||
using Pixelplacement.TweenSystem;
|
||||
using System.Collections;
|
||||
using System.Runtime.CompilerServices;
|
||||
using UnityEngine.Audio;
|
||||
|
||||
public class WorkerBeltRoamingBehaviour : AppleState
|
||||
{
|
||||
@@ -23,10 +24,17 @@ public class WorkerBeltRoamingBehaviour : AppleState
|
||||
// Reference to the active spline tween so we can pause/stop it
|
||||
private TweenBase roamingTween;
|
||||
|
||||
// Sound refs
|
||||
public AppleAudioSource audioSource;
|
||||
public AudioResource roamingWorkerAudio;
|
||||
public AudioResource fallAudio;
|
||||
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
audioSource.audioSource.resource = roamingWorkerAudio;
|
||||
audioSource.Play(0);
|
||||
|
||||
if (workerAnimator != null)
|
||||
workerAnimator.SetBool("isLifting?", false);
|
||||
|
||||
@@ -120,5 +128,17 @@ public class WorkerBeltRoamingBehaviour : AppleState
|
||||
{
|
||||
roamingTween.Stop();
|
||||
}
|
||||
|
||||
public void PlayFallAudio()
|
||||
{
|
||||
audioSource.audioSource.resource = fallAudio;
|
||||
audioSource.Play(0);
|
||||
}
|
||||
|
||||
public void PlayHmAudio()
|
||||
{
|
||||
audioSource.audioSource.resource = roamingWorkerAudio;
|
||||
audioSource.Play(0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user