Exemplo n.º 1
0
 public void Render()
 {
     while(true)
     {
         Thread.Sleep((int)(RenderRate * 1000));
         Repaint();
         if (AdjustToWindowMovement)
         {
             PointF CurrentWindowPos = new PointF(Left, Top);
             PointF Delta = CurrentWindowPos.Minus(LastWindowPos);
             foreach (Particle P in Particles)
                 P.Position = P.Position.Minus(Delta);
             LastWindowPos = CurrentWindowPos;
         }
     }
 }
Exemplo n.º 2
0
 public static PointF Lerp(this PointF p1, PointF p2, float x)
 {
     return(p1.Plus(p2.Minus(p1).Multiply(x)));
 }