Package civquest.units.move

Examples of civquest.units.move.UnitMover


      Coordinate delta = getDirection();
      Coordinate to = Game.getMapData().adjustToMapSize(from.add(delta));
     
      MoveStep step = new MoveStep(group, to);

      UnitMover unitMover = quadMap.getUnitMover();
      UnitMover.MoveInfo moveInfo
        = unitMover.getMovementChanges(Game.getGame(), step);

      if (moveInfo.canMoveNow()) {
        try {
          moveInfo.executeChanges();
        } catch (Exception ex) {
View Full Code Here


    this.quadMap = quadMap;
  }

  public void actionPerformed(FunctionActionEvent e) {
    Set<MovePath> paths = quadMap.getDisplayedMovePaths();
    UnitMover unitMover = quadMap.getUnitMover();

    for (MovePath p : paths) {
      if (!(p instanceof PossibleMovePath)) {
        continue;
      }

      PossibleMovePath path = (PossibleMovePath)(p);

      if (path.isEmpty()) {
        continue;
      }


      MoveStep step = path.getFirstStep();
     
      UnitMover.MoveInfo moveInfo
        = unitMover.getMovementChanges(Game.getGame(), step);

      if (moveInfo.canMoveNow()) {
        try {
          moveInfo.executeChanges();
          path.removeFirstStep();
View Full Code Here

        quadRegistry = registry.getSubRegistry("gui").getSubRegistry("quadmapview");
    Registry overlapRegistry = registry.getSubRegistry("map").getSubRegistry("overlap");

    moveCalculator
      = new DijkstraMoveCalculator(Game.getGame().getTimeRules());
        unitMover = new UnitMover();

    /********************** Properties-construction ***********************/

        config.load(quadRegistry, overlapRegistry);

View Full Code Here

TOP

Related Classes of civquest.units.move.UnitMover

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.