Exemplo n.º 1
0
 protected SoundObject(ISoundObjectParent parent, SoundEffectGame sfx)
 {
     this.parent          = parent;
     this.soundEffectGame = sfx;
     this.emitter         = new AudioEmitter();
     this.Volume          = sfx.Volume;
 }
Exemplo n.º 2
0
 protected SoundObject(ISoundObjectParent parent, SoundEffectGame sfx)
 {
     this.parent = parent;
     this.soundEffectGame = sfx;
     this.emitter = new AudioEmitter();
     this.Volume = sfx.Volume;
 }
Exemplo n.º 3
0
        public AmbientLoopSoundObject(SoundManager sm, ISoundObjectParent parent, SoundEffectGame sfx, float radius)
            : base(parent, sfx)
        {
            this.lastDistance = float.MaxValue;

            this.radius = radius;
        }
Exemplo n.º 4
0
        public SoundObject MakeSoundObjcet(string name, ISoundObjectParent parent, float r)
        {
            SoundEffectGame sfx = sfxTable[name];

            switch (sfx.Type)
            {
            case SoundType.Global:
            case SoundType.World:
                if ((sfx.Control & SoundControl.Loop) == SoundControl.Loop)
                {
                    return(new AmbientLoopSoundObject(this, parent, sfx, r));
                }
                else if ((sfx.Control & SoundControl.Ambient) == SoundControl.Ambient)
                {
                    return(new AmbientSoundObject(this, parent, sfx, r));
                }
                return(new Normal3DSoundObject(this, parent, sfx, r));

            case SoundType.Normal:
            case SoundType.Player:
                return(new NormalSoundObject(this, parent, sfx));
            }
            throw new NotSupportedException();
        }
Exemplo n.º 5
0
 public SoundObject MakeSoundObjcet(string name, ISoundObjectParent parent,  float r)
 {
     SoundEffectGame sfx = sfxTable[name];
     switch (sfx.Type)
     {
         case SoundType.Global:
         case SoundType.World:
             if ((sfx.Control & SoundControl.Loop) == SoundControl.Loop)
             {
                 return new AmbientLoopSoundObject(this, parent, sfx, r);
             }
             else if ((sfx.Control & SoundControl.Ambient) == SoundControl.Ambient)
             {
                 return new AmbientSoundObject(this, parent, sfx, r);
             }
             return new Normal3DSoundObject(this, parent, sfx, r);                  
         case SoundType.Normal:
         case SoundType.Player:
             return new NormalSoundObject(this, parent, sfx);
     }
     throw new NotSupportedException();
 }
Exemplo n.º 6
0
        public AmbientLoopSoundObject(SoundManager sm, ISoundObjectParent parent, SoundEffectGame sfx, float radius)
            : base(parent, sfx)
        {
            this.lastDistance = float.MaxValue;

            this.radius = radius;
        }
Exemplo n.º 7
0
 public AmbientSoundObject(SoundManager sm, ISoundObjectParent parent, SoundEffectGame sfx, float radius)
     : base(parent, sfx)
 {
     this.radius = radius;
     this.Probability = sfx.Probability;
 }
Exemplo n.º 8
0
 public Normal3DSoundObject(SoundManager sm, ISoundObjectParent parent, SoundEffectGame sfx, float radius)
     : base(parent, sfx)
 {
     this.radius = radius;
 }
Exemplo n.º 9
0
 public NormalSoundObject(SoundManager sm, ISoundObjectParent parent, SoundEffectGame sfx)
     : base(parent, sfx)
 {
     this.radius = 1;
 }
Exemplo n.º 10
0
 public AmbientSoundObject(SoundManager sm, ISoundObjectParent parent, SoundEffectGame sfx, float radius)
     : base(parent, sfx)
 {
     this.radius      = radius;
     this.Probability = sfx.Probability;
 }
Exemplo n.º 11
0
 public Normal3DSoundObject(SoundManager sm, ISoundObjectParent parent, SoundEffectGame sfx, float radius)
     : base(parent, sfx)
 {
     this.radius = radius;
 }
Exemplo n.º 12
0
 public NormalSoundObject(SoundManager sm, ISoundObjectParent parent, SoundEffectGame sfx)
     : base(parent, sfx)
 {
     this.radius = 1;
 }