Audio refactor almost done
This commit is contained in:
@@ -7,7 +7,7 @@ public class SoundGenerator : MonoBehaviour
|
||||
[SerializeField] private Sprite enterSprite;
|
||||
[SerializeField] private Sprite exitSprite;
|
||||
[SerializeField] private AudioClip enterSound;
|
||||
[SerializeField] private AudioSource audioSource;
|
||||
[SerializeField] private AppleAudioSource audioSource;
|
||||
[SerializeField] private StateMachine soundBirdSMRef;
|
||||
[SerializeField] private soundBird_CanFly soundbirdHearingCheck;
|
||||
|
||||
@@ -35,7 +35,7 @@ public class SoundGenerator : MonoBehaviour
|
||||
}
|
||||
if (audioSource != null && enterSound != null)
|
||||
{
|
||||
audioSource.PlayOneShot(enterSound);
|
||||
audioSource.audioSource.PlayOneShot(enterSound);
|
||||
}
|
||||
if (soundBirdSMRef != null && soundBirdSMRef.currentState.name == "SoundBird" && soundbirdHearingCheck.canFly == true)
|
||||
{
|
||||
|
||||
@@ -13,7 +13,7 @@ public class soundBird_TakeOffBehaviour : MonoBehaviour
|
||||
private Animator animator;
|
||||
private TweenBase objectTween;
|
||||
|
||||
public AudioSource audioSource;
|
||||
public AppleAudioSource audioSource;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
@@ -29,7 +29,7 @@ public class soundBird_TakeOffBehaviour : MonoBehaviour
|
||||
{
|
||||
animator.SetBool("isScared", true);
|
||||
objectTween = Tween.Spline(FlightSpline, SoundBirdObject, 0, 1, false, flightDuration, flightDelay, Tween.EaseIn, Tween.LoopType.None, HandleTweenStarted, HandleTweenFinished);
|
||||
audioSource.Play();
|
||||
audioSource.Play(0);
|
||||
}
|
||||
void HandleTweenStarted()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user