Ejemplo n.º 1
0
        public void AudioClip_OnReadyBeforeLoading()
        {
            DCLAudioClip dclAudioClip = CreateAudioClip(DCL.Helpers.Utils.GetTestsAssetsPath() + "/Audio/short_effect.ogg", true, true, 1);
            bool         isOnReady    = false;

            dclAudioClip.CallWhenReady((x) => { isOnReady = true; });

            Assert.IsTrue(isOnReady); //DCLAudioClip is ready on creation
        }
Ejemplo n.º 2
0
        public IEnumerator AudioClip_OnReadyWaitLoading()
        {
            DCLAudioClip dclAudioClip = CreateAudioClip(DCL.Helpers.Utils.GetTestsAssetsPath() + "/Audio/short_effect.ogg", true, true, 1);
            bool         isOnReady    = false;

            dclAudioClip.CallWhenReady((x) => { isOnReady = true; });
            yield return(dclAudioClip.routine);

            Assert.IsTrue(isOnReady);
        }
Ejemplo n.º 3
0
        public IEnumerator AudioClip_OnReadyAfterLoadingInstantlyCalled()
        {
            DCLAudioClip dclAudioClip = CreateAudioClip(TestAssetsUtils.GetPath() + "/Audio/short_effect.ogg", true, true, 1);

            yield return(dclAudioClip.routine);

            bool isOnReady = false;

            dclAudioClip.CallWhenReady((x) => { isOnReady = true; });

            Assert.IsTrue(isOnReady);
        }