コード例 #1
0
 @Override
 public void render(Graphics2D g) {
   super.render(g);
   if (img != null) {
     g.drawImage(
         img.getImage(this, parent.tiles, parent.lines).resolve(),
         (int) position.x,
         (int) position.y,
         null);
   }
 }
コード例 #2
0
 @Override
 public void update(QScreen currScreen, double delta) {
   super.update(currScreen, delta);
   if (img == QTileContents.Button && charged) {
     timer += delta;
     if (timer > MAX_TIMER) {
       timer = 0.00;
       charged = false;
       parent.blockUpdate(QWireTile.this.tileX, QWireTile.this.tileY);
     }
   }
 }