コード例 #1
0
ファイル: UIContainer.cs プロジェクト: masums/NeoAxisEngine
        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;
            }