Beispiel #1
0
 @Override
 public void render(SpriteBatch batch) {
   batch.draw(texture, x, y, width, height);
   Assets.getFont().getData().setScale(0.7f);
   Assets.getFont().setColor(Color.BLACK);
   Assets.getFont().draw(batch, "Generator", x - 20, y - 4);
   Assets.getFont().draw(batch, "" + cost, x + 4, y - 24);
   Assets.getFont().setColor(1.0f, 1.0f, 0.0f, 1.0f);
   Assets.getFont().getData().setScale(0.5f);
   Assets.getFont().draw(batch, "+  /" + (int) GeneratorTile.TIMEINTERVAL + "s", x + 2, y + 54);
   batch.draw(Assets.getRegion("resourceIcon"), x + 44, y - 38, 16, 16);
   batch.draw(Assets.getRegion("energyIcon"), x + 14, y + 40, 16, 16);
 }
Beispiel #2
0
 public BuyGeneratorButton(float x, float y) {
   super(x, y, 64, 64, 400);
   texture = Assets.getRegion("generator.1");
 }