Package com.drakulo.games.ais.core

Examples of com.drakulo.games.ais.core.Colony


   *            the player input
   */
  private void handleScrollUpdate(Input input) {
    final int mouseX = input.getMouseX();
    final int mouseY = input.getMouseY();
    Colony c = GameData.getSelectedColony();
    // Vertical scroll
    if (this.topScrollZone.contains(mouseX, mouseY)) {
      c.setViewportY(c.getViewportY() + Settings.MAP_SCROLL_SPEED);
    } else if (this.bottomScrollZone.contains(mouseX, mouseY)) {
      c.setViewportY(c.getViewportY() - Settings.MAP_SCROLL_SPEED);
    }

    // Horizontal scroll
    if (this.leftScrollZone.contains(mouseX, mouseY)) {
      c.setViewportX(c.getViewportX() + Settings.MAP_SCROLL_SPEED);
    } else if (this.rightScrollZone.contains(mouseX, mouseY)) {
      c.setViewportX(c.getViewportX() - Settings.MAP_SCROLL_SPEED);
    }
  }
View Full Code Here


    }

    ba.getBuilding().setX(tileX);
    ba.getBuilding().setY(tileY);
    final BuildingAction nba = ba.clone();
    final Colony c = GameData.getSelectedColony();
    nba.setCallback(new Runnable() {

      @Override
      public void run() {
        BuildingHelper.createCMConstructionCallback(tileX, tileY, c);
      }
    });

    TileHelper.setTile(tileX, tileY, TileHelper.BUILDABLE_TILE,
        GameData.getSelectedColony());
    c.addBuildingAction(nba);

    // Construction is disabled until command center is fully built
    this.developButton.disable();

    // By the way the Command Center is unselected automatically when built
View Full Code Here

TOP

Related Classes of com.drakulo.games.ais.core.Colony

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.