Package com.pointcliki.grid

Examples of com.pointcliki.grid.GridCoordinate


    }
    return true;
  }

  protected void followPath() {
    GridCoordinate xy = fPath.get(fPathIndex);
    fPathIndex++;
   
    xy = xy.subtract(fGrunt.getTile());
    fGrunt.animate("WALK", "WALK", xy);
    fGrunt.movement().move(xy);
    fGrunt.state(GruntState.MOVING);
  }
View Full Code Here


               
        // Check for giant rock
        if (type.startsWith("GROCK") && !fGiantRockBreaking) {
          if (type.equals("GROCK")) found = breakGiantRock(xy.subtract(GridCoordinate.NORTH_WEST));
          else if (type.equals("GROCK_T")) found = breakGiantRock(xy.subtract(GridCoordinate.WEST));
          else if (type.equals("GROCK_R")) found = breakGiantRock(xy.add(new GridCoordinate(-2, -1)));
          else if (type.equals("GROCK_B")) found = breakGiantRock(xy.add(new GridCoordinate(-1, -2)));
          else if (type.equals("GROCK_L")) found = breakGiantRock(xy.add(GridCoordinate.NORTH));
          else if (type.equals("GROCK_TR")) found = breakGiantRock(xy.add(new GridCoordinate(-2, 0)));
          else if (type.equals("GROCK_BR")) found = breakGiantRock(xy.add(new GridCoordinate(-2, -2)));
          else if (type.equals("GROCK_BL")) found = breakGiantRock(xy.add(new GridCoordinate(0, -2)));
          else if (type.equals("GROCK_TL")) found = breakGiantRock(xy);
        } else {
          int rep = fTilesets[i].tile(info.tile());
          if (rep >= 0) tile(i, xy.x(), xy.y(), rep);
          found = true;
View Full Code Here

  public boolean breakGiantRock(GridCoordinate xy) {
    fGiantRockBreaking = true;
    boolean found = false;
    for (int y = 0; y < 3; y++) {
      for (int x = 0; x < 3; x++) {
        found = found | tileToggle(xy.add(new GridCoordinate(x, y)));
      }
    }
    fGiantRockBreaking = false;
    return found;
  }
View Full Code Here

    GridManager gm = fMapManager.parent().manager(GridManager.class);
   
    // Iterate through tiles to find red pyramids
    for (int y = 0; y < fWidth; y++) {
      for (int x = 0; x < fHeight; x++) {
        GridCoordinate xy = new GridCoordinate(x, y);
       
        if (traits(xy).contains("redPyramid")) {
          // Check whether a logic has been placed here
          Effect e = gm.getFirstEntityOfTypeAt(xy, Effect.class);
          if (e == null) {
View Full Code Here

TOP

Related Classes of com.pointcliki.grid.GridCoordinate

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.