Exemple #1
0
 public static BufferedImage zoom(BufferedImage image, Zoom zoom) {
   int scale = 1;
   if (zoom == Zoom.MID) {
     scale = 2;
   }
   if (zoom == Zoom.OUT) {
     scale = 4;
   }
   return Drawing.resize(image, image.getWidth() / scale, image.getHeight() / scale);
 }
  public StateBattle() {
    // Battle
    this.battleState = "INTRO";
    this.battleTime = System.nanoTime();

    // Units
    this.unitAllies = new ArrayList();
    this.unitEnemies = new ArrayList();

    // Command Menu
    this.commandNull();

    // Boost
    this.boostNull();

    // TEMP
    this.unitAddAlly(
        new UnitAlly(this, "Krator", Drawing.getImage("characters/Krator/battle.png"), 1100, 150));
    this.unitAddAlly(
        new UnitAlly(this, "Tyde", Drawing.getImage("characters/Tyde/battle.png"), 1100, 250));
    this.unitAddEnemy(
        new UnitEnemy(this, "Kawker", Drawing.getImage("units/dino/kawker.png"), 100, 100));
  }
Exemple #3
0
 public static BufferedImage image(String file) {
   return Drawing.getImageFile(Engine.getResourcePath() + "/" + file);
 }