Package com.pointcliki.grid

Examples of com.pointcliki.grid.GridCoordinate.y()


        GridCoordinate dist = path.get(j).subtract(path.get(i));
        // Get perpendicular and parallel distance
        int u;  // Perpendicular
        int v;  // Parallel
        if (Math.abs(lineDir.x()) == 1) {
          u = Math.abs(dist.y());
          v = Math.abs(dist.x());
        } else {
          u = Math.abs(dist.x());
          v = Math.abs(dist.y());
        }
View Full Code Here


        if (Math.abs(lineDir.x()) == 1) {
          u = Math.abs(dist.y());
          v = Math.abs(dist.x());
        } else {
          u = Math.abs(dist.x());
          v = Math.abs(dist.y());
        }
        ArrayList<GridCoordinate> segment = new ArrayList<GridCoordinate>();
        // Found
        boolean segFound = true;
        // Iterate over columns to find an optimal path segment
View Full Code Here

      @Override
      public long run(Dispatcher<IEvent> dispatcher, String type, IEvent event) {
        if (event instanceof MouseEvent && fSideContainer instanceof TilesSideBar) {
          GridCoordinate g = fMapViewer.tileAtPoint(new Vector2f(((MouseEvent)event).x(), ((MouseEvent)event).y() - 28));
          TilesSideBar side = (TilesSideBar) fSideContainer;
          fMapViewer.map().tile(side.tileset(), g.x(), g.y(), side.selected());
        }
        if (fAniCursor != null) {
          if (((MouseEvent) event).button() == 1) setEditingLogic(null);
          else ((ObjectSideBar) fSideContainer).placeLogic(new Vector2f(((MouseEvent) event).x() - fMapViewer.offset().x, ((MouseEvent) event).y() - fMapViewer.offset().y - 28));
        }
View Full Code Here

      @Override
      public long run(Dispatcher<IEvent> dispatcher, String type, IEvent event) {
        if (event instanceof MouseEvent && fSideContainer instanceof TilesSideBar) {
          GridCoordinate g = fMapViewer.tileAtPoint(new Vector2f(((MouseEvent)event).x(), ((MouseEvent)event).y() - 28));
          TilesSideBar side = (TilesSideBar) fSideContainer;
          fMapViewer.map().tile(side.tileset(), g.x(), g.y(), side.selected());
          fCursor.position(fMapViewer.positionOfTile(g).add(new Vector2f(0, 28)));
        }
        return Minion.CONTINUE;
      }
    });
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.