Worker and secretary audio
This commit is contained in:
@@ -2,15 +2,19 @@ using UnityEngine;
|
||||
using Core.Lifecycle;
|
||||
using Core.SaveLoad;
|
||||
using System.Collections;
|
||||
using UnityEngine.Audio;
|
||||
|
||||
public class CanStealFlowerStateBehaviour : AppleState
|
||||
{
|
||||
public ReceptionistBehaviour receptionistObject;
|
||||
public AppleAudioSource audioSource;
|
||||
public AudioResource thinkingAudio;
|
||||
|
||||
public void OnEnable()
|
||||
{
|
||||
|
||||
StartCoroutine(holdStateForSeconds(receptionistObject.holdFlowerDuration));
|
||||
audioSource.audioSource.resource = thinkingAudio;
|
||||
audioSource.Play(0);
|
||||
}
|
||||
|
||||
public override void OnRestoreState(string data)
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class ReceptionistAnimEventWrapper : MonoBehaviour
|
||||
{
|
||||
public ReceptionistCountingBehavior countingBehavior;
|
||||
|
||||
public void PlayLoveAudio(string lovesMe)
|
||||
{
|
||||
if (lovesMe == "true")
|
||||
{
|
||||
countingBehavior.PlayCountingAudio(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
countingBehavior.PlayCountingAudio(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a6a11442976e9fe4182f597f6647ea02
|
||||
@@ -0,0 +1,23 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.Audio;
|
||||
|
||||
public class ReceptionistCountingBehavior : MonoBehaviour
|
||||
{
|
||||
public AudioResource lovesMeAudio;
|
||||
public AudioResource lovesMeNotAudio;
|
||||
|
||||
public AppleAudioSource audioSource;
|
||||
|
||||
public void PlayCountingAudio(bool lovesMe)
|
||||
{
|
||||
if (lovesMe)
|
||||
{
|
||||
audioSource.audioSource.resource = lovesMeAudio;
|
||||
}
|
||||
else
|
||||
{
|
||||
audioSource.audioSource.resource = lovesMeNotAudio;
|
||||
}
|
||||
audioSource.Play(0);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7e1ac173ceb63224fae2229c534c6e0a
|
||||
@@ -7,11 +7,14 @@ public class RoamingWorkerAnimationEvents : MonoBehaviour
|
||||
public void WorkerGotUp()
|
||||
{
|
||||
roamingBehaviour.ContinueRoaming();
|
||||
roamingBehaviour.PlayHmAudio();
|
||||
}
|
||||
|
||||
public void PauseTween()
|
||||
{
|
||||
roamingBehaviour.PauseRoaming();
|
||||
roamingBehaviour.PlayFallAudio();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.Audio;
|
||||
|
||||
public class ThrowAwayFlowerBehaviour : MonoBehaviour
|
||||
{
|
||||
public AppleAudioSource audioSource;
|
||||
public AudioResource doesNotCountAudio;
|
||||
|
||||
public void OnEnable()
|
||||
{
|
||||
audioSource.audioSource.resource = doesNotCountAudio;
|
||||
audioSource.Play(0);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9d759cbc7c55f9046b46029991aca347
|
||||
@@ -1,13 +1,20 @@
|
||||
using UnityEngine;
|
||||
using Core.SaveLoad;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Audio;
|
||||
|
||||
public class WorkerLiftingStateBehavior : AppleState
|
||||
{
|
||||
public GameObject roamingWorker;
|
||||
|
||||
public AppleAudioSource audioSource;
|
||||
public AudioResource liftingAudio;
|
||||
|
||||
public override void OnEnterState()
|
||||
{
|
||||
roamingWorker.SetActive(false);
|
||||
|
||||
audioSource.audioSource.resource = liftingAudio;
|
||||
audioSource.Play(0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user