示例#1
0
        public void Play()
        {
            if (audioClip == null)
            {
                if (UIConfig.soundLoader == null || sound.StartsWith(UIPackage.URL_PREFIX))
                {
                    audioClip = UIPackage.GetItemAssetByURL(sound) as AudioClip;
                }
                else
                {
                    audioClip = UIConfig.soundLoader(sound);
                }
            }

            if (audioClip != null)
            {
                Stage.inst.PlayOneShotSound(audioClip, volume);
            }
        }