public void Update(Time time)
 {
     elapsed += time.Elapsed;
     while (elapsed > particleInterval)
     {
         elapsed -= particleInterval;
         EmitParticle();
     }
 }
 public void Update(Time time)
 {
     //TODO: Add code for multithreading here.
     foreach (var system in logicSystems)
     {
         if(system.Enabled)
             system.Exceute(time);
     }
 }
        protected override void Draw(Utils.Time time)
        {
            base.Draw(time);
            this.time = time;
            Matrix4 proj = Matrix4.CreateOrthographicOffCenter(0, this.Width, this.Height, 0, -1, 10);

            foreach (var item in systems)
            {
                item.Render(ref proj, this.particleProgram, this.particleAtlas.Texture);
            }
        }
            public void Update(Time time)
            {
                elapsed += time.Elapsed;
                if (elapsed > Time)
                {
                    this.Compleate = true;
                }

                float value = (float)(elapsed.TotalMilliseconds / Time.TotalMilliseconds);

                Color l = lerp(from, to, value);
                UpdatedValue(l);
            }
 public virtual void Update(Time time)
 {
 }
        void window_UpdateFrame(object sender, FrameEventArgs e)
        {
            clock.Step();
            this.Time = new Time(this.Time.Total + elapsed, clock.Elapsed);

            this.elapsed += clock.Elapsed;
            if(this.elapsed > TimeSpan.FromSeconds(1)) {
                this.elapsed -= TimeSpan.FromSeconds(1);
                window.Title = "" + count;
                this.count = 0;
            }
            this.count++;

            this.panel.Update(this.Time);
            this.Update(this.Time);
        }
 /// <summary>
 /// Called every frame, update logic goes here.
 /// </summary>
 /// <param name="time">Time</param>
 protected virtual void Update(Time time)
 {
 }
 /// <summary>
 /// Called every frame, render code goes here.
 /// </summary>
 /// <param name="time">Time</param>
 protected virtual void Draw(Time time)
 {
 }
        public void Update(Time time)
        {
            currentTime += time.ElapsedSeconds;

            RetireActiveParticles();
            FreeRetiredParticles();

            if (firstActiveParticle == firstFreeParticle)
                currentTime = 0;

            if (firstRetiredParticle == firstActiveParticle)
                drawCounter = 0;
        }
Example #10
0
 public override void Update(Time time)
 {
     Vector2 n = new Vector2(MathHelper.RandomFloat(-1, 1), MathHelper.RandomFloat(-1,1)) * time.ElapsedSeconds* 1000;
     this.Position += n;
     base.Update(time);
 }
Example #11
0
 public virtual void Update(Time time)
 {
     elapsed += time.Elapsed;
     while (elapsed > EmitInterval)
     {
         elapsed -= EmitInterval;
         for (int i = 0; i < this.EmitCount; i++)
         {
             EmitParticle(this.RandomParticleFrame());
         }
     }
 }
 public void Draw(Time time)
 {
     throw new NotImplementedException();
 }