Esempio n. 1
0
 public override void CreateUI(GLEx g, int x, int y, LComponent component,
                               LTexture[] buttonImage)
 {
     if (visible && goalPath != null)
     {
         g.SetLineWidth(lineWidth);
         g.GLBegin(GL.GL_LINE_STRIP);
         g.Draw(goalPath, color);
         g.GLEnd();
         g.ResetLineWidth();
         g.ResetColor();
     }
 }
Esempio n. 2
0
 public void Render()
 {
     if ((engine.UsePoints() && (usePoints == INHERIT_POINTS)) ||
         (usePoints == USE_POINTS))
     {
         GLEx gl = GLEx.Self;
         gl.GLBegin(GL.GL_POINTS);
         gl.GLColor(color);
         gl.GLVertex2f(x, y);
         gl.GLEnd();
     }
     else
     {
         float angle = 0;
         if (oriented)
         {
             angle = MathUtils.Atan2(y, x) * 180 / MathUtils.PI;
         }
         image.Draw((x - (size / 2)), (y - (size / 2)), size, size, angle,
                    color);
     }
 }