public void AddLightStage(FXLightStage stageDesc, FXEvent fxEvent, bool looped) { if (!stageDesc.Enabled) { return; } var stage = new LightStage(this, stageDesc, fxEvent, looped); stages.Add(stage); }
/// <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(); }