Ejemplo n.º 1
0
 private void complete() {
   complete = true;
   final Surface surface = surfaceLayer.surface();
   surface.clear();
   surface.drawImage(image, 20, 20, surface.width(), surface.height());
   if (sound != null) {
     sound.play();
   }
 }
Ejemplo n.º 2
0
 public static void DrawString(Surface g, TextLayout layout, int x, int y) {
   CanvasImage c =
       Global.m_graphics.createImage(
           (int) Math.ceil(layout.width()), (int) Math.ceil(layout.height()));
   Canvas gc = c.canvas();
   gc.drawText(layout, 0, 0);
   g.drawImage(c, x, y);
 }
Ejemplo n.º 3
0
 void DebugDraw(Surface surf, Vector2 offsets) {
   surf.setFillColor(Color.rgb(15, 40, 89));
   surf.fillRect(getPosition().X + offsets.X, getPosition().Y + offsets.Y, 10, 10);
 }