示例#1
0
            public override void Update(float dt, FXEvent fxEvent)
            {
                timer += dt;


                while (timer > stageDesc.Period)
                {
                    timer -= period;

                    if (!looped)
                    {
                        stopped = true;
                        Kill();
                    }
                    else
                    {
                        counter++;
                        UpdatePeriodIntensity();
                    }
                }

                UpdateLightStyle();

                light.Position = FXFactory.GetPosition(stageDesc.OffsetDirection, stageDesc.OffsetFactor, fxEvent);
            }
示例#2
0
        public Vector3 GetPosition(FXEvent fxEvent, Random rand)
        {
            var position = FXFactory.GetPosition(OffsetDirection, OffsetFactor, fxEvent);
            var radial   = FXFactory.GetRadialDistribution(rand, Distribution, MinSize, MaxSize);

            return(position + radial);
        }
示例#3
0
            /// <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();
            }