/// <summary> /// /// </summary> /// <param name="instance"></param> /// <param name="position"></param> /// <param name="soundPath"></param> public SoundStage(FXInstance instance, FXSoundStage stageDesc, FXEvent fxEvent, bool looped) : base(instance) { var sound = instance.fxPlayback.LoadSound(stageDesc.Sound); if (sound == null) { return; } emitter = instance.sw.AllocEmitter(); emitter.Position = fxEvent.Origin; emitter.DistanceScale = FXFactory.GetRadius(stageDesc.Attenuation); emitter.DopplerScale = 1; emitter.VolumeCurve = null; emitter.LocalSound = false; emitter.PlaySound(sound, looped ? PlayOptions.Looped : PlayOptions.None); }
/// <summary> /// /// </summary> /// <param name="instance"></param> /// <param name="position"></param> /// <param name="color"></param> /// <param name="radius"></param> /// <param name="fadeInRate"></param> /// <param name="fadeOutRate"></param> public LightStage(FXInstance instance, FXLightStage stageDesc, FXEvent fxEvent, bool looped) : base(instance) { light = new OmniLight(); this.stageDesc = stageDesc; light.Position = FXFactory.GetPosition(stageDesc.OffsetDirection, stageDesc.OffsetFactor, fxEvent); light.RadiusInner = stageDesc.InnerRadius; light.RadiusOuter = stageDesc.OuterRadius; light.Intensity = stageDesc.Intensity; this.period = stageDesc.Period; this.looped = looped; instance.rw.LightSet.OmniLights.Add(light); UpdatePeriodIntensity(); UpdateLightStyle(); }
/// <summary> /// /// </summary> /// <param name="fxEvent"></param> /// <param name="spriteIndex"></param> /// <param name="delay"></param> /// <param name="period"></param> /// <param name="sleep"></param> /// <param name="count"></param> /// <param name="emit"></param> public ParticleStage(FXInstance instance, FXParticleStage stageDesc, FXEvent fxEvent, bool looped) : base(instance) { this.stage = stageDesc; this.looped = looped; this.spriteIndex = instance.fxPlayback.GetSpriteIndex(stageDesc.Sprite); }
/// <summary> /// /// </summary> /// <param name="sfxInstance"></param> public Stage(FXInstance sfxInstance) { this.fxInstance = sfxInstance; }