예제 #1
0
 public override void OnEnterState(AudioEvent audioEvent)
 {
     //todo do some initialize work
     base.OnEnterState(audioEvent);
     AudioEvent.Loaded = false;
     AudioEvent.EnterState("ToPlay");
 }
예제 #2
0
파일: Playing.cs 프로젝트: Zgs/ZAudioEngine
        public override void OnStateUpdate()
        {
            AudioEvent.ApplyChannelParameters();
            if (!AudioEvent.AudioSource.isPlaying)
            {
                AudioEvent.EnterState("Stopping");
            }

            if (AudioEvent.ShouldBeVirtual())
            {
                AudioEvent.EnterState("Virtualizing");
            }
        }
예제 #3
0
파일: Virtual.cs 프로젝트: Zgs/ZAudioEngine
        public override void OnStateUpdate()
        {
            base.OnStateUpdate();
            if (!AudioEvent.ShouldBeVirtual())
            {
                AudioEvent.EnterState("ToPlay");
            }

            if (!AudioEvent.AudioSource.isPlaying)
            {
                AudioEvent.EnterState("Stopping");
            }
        }
예제 #4
0
파일: ToPlay.cs 프로젝트: Zgs/ZAudioEngine
        public override void OnEnterState(AudioEvent audioEvent)
        {
            base.OnEnterState(audioEvent);
            if (AudioEvent.ShouldBeVirtual())
            {
                if (AudioEvent.OnShot)
                {
                    AudioEvent.EnterState("Stopping");
                }
                else
                {
                    AudioEvent.EnterState("Virtual");
                }
                return;
            }

            if (!AudioEvent.Loaded)
            {
                AudioEvent.EnterState("Load");
                return;
            }

            AudioEvent.EnterState("Playing");
        }