Worker and secretary audio

This commit is contained in:
journaliciouz
2025-12-18 21:31:48 +01:00
parent c4c513733a
commit 8e4886f7e0
30 changed files with 972 additions and 36 deletions

View File

@@ -1,7 +1,8 @@
using Core.SaveLoad;
using UnityEngine;
using Pixelplacement;
using Pixelplacement.TweenSystem;
using UnityEngine;
using UnityEngine.Audio;
public class WorkerBeltApproachingBehaviour : AppleState
{
@@ -17,8 +18,14 @@ public class WorkerBeltApproachingBehaviour : AppleState
private TweenBase aproachTween;
public AppleMachine workerBeltStateMAchineRef;
public AppleAudioSource audioSource;
public AudioResource approachAudio;
private void OnEnable()
{
audioSource.audioSource.resource = approachAudio;
audioSource.Play(0);
// ensure roaming ref exists before accessing
Transform anchorA = transform.Find("AnchorA");
if (anchorA != null && workerBeltRoamingRef != null)