Пример #1
0
        public virtual void PlaySound(Component_Sound sound)
        {
            var mode   = Transform3D != null ? SoundModes.Mode3D : 0;
            var sound2 = sound?.Result?.LoadSoundByMode(mode);

            if (sound2 == null)
            {
                return;
            }

            //!!!!attachedToScene
            var channel = SoundWorld.SoundPlay(null, sound2, EngineApp.DefaultSoundChannelGroup, 0.5, true);

            if (channel != null)
            {
                if (Transform3D != null)
                {
                    channel.Position = Transform3D.Position;
                    //channel.Velocity = xxx;
                }
                channel.Pause = false;
            }
        }
Пример #2
0
 public void SoundPlay(Component_Sound sound)
 {
     ParentScene?.SoundPlay(sound, TransformV.Position);
 }
Пример #3
0
 public void SoundPlay(Component_Sound sound)
 {
     ParentScene?.SoundPlay2D(sound);
 }
Пример #4
0
            //Sound sound;

            ////////////

            public CompiledData(Component_Sound owner)
            {
                this.owner = owner;
            }