protected SoundObject(ISoundObjectParent parent, SoundEffectGame sfx) { this.parent = parent; this.soundEffectGame = sfx; this.emitter = new AudioEmitter(); this.Volume = sfx.Volume; }
public AmbientLoopSoundObject(SoundManager sm, ISoundObjectParent parent, SoundEffectGame sfx, float radius) : base(parent, sfx) { this.lastDistance = float.MaxValue; this.radius = radius; }
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(); }
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(); }
public AmbientSoundObject(SoundManager sm, ISoundObjectParent parent, SoundEffectGame sfx, float radius) : base(parent, sfx) { this.radius = radius; this.Probability = sfx.Probability; }
public Normal3DSoundObject(SoundManager sm, ISoundObjectParent parent, SoundEffectGame sfx, float radius) : base(parent, sfx) { this.radius = radius; }
public NormalSoundObject(SoundManager sm, ISoundObjectParent parent, SoundEffectGame sfx) : base(parent, sfx) { this.radius = 1; }