예제 #1
0
 public static void renderAll(GTA.Graphics g)
 {
     foreach (var view in ViewsPool)
     {
         if (view.currentInterpolatorX != null && view.currentInterpolatorX.HasStarted) // those conditonals actually make sense
         {
             if (view.currentInterpolatorX.HasEnded && !view.currentInterpolatorX.HasStarted)
             {
                 view.currentInterpolatorX = null;
             }
             else
             {
                 view.position.X = view.currentInterpolatorX.Current;
             }
         }
         if (view.currentInterpolatorY != null && view.currentInterpolatorY.HasStarted)
         {
             if (view.currentInterpolatorY.HasEnded && !view.currentInterpolatorY.HasStarted)
             {
                 view.currentInterpolatorY = null;
             }
             else
             {
                 view.position.Y = view.currentInterpolatorY.Current;
             }
         }
         view.render(g);
     }
 }
예제 #2
0
 protected override void render(GTA.Graphics g)
 {
     g.DrawRectangle(Box, color);
 }
예제 #3
0
 protected abstract void render(GTA.Graphics g);
 protected override void render(GTA.Graphics g)
 {
     g.DrawLine(start, end, width, color);
 }