Examples of Coords


Examples of megamek.common.Coords

                    while (vel > 0) {
                        // check to see if the unit is currently on a border
                        // and facing a direction that would indicate leaving
                        // the map
                        Coords position = a.getPosition();
                        int facing = a.getFacing();
                        MoveStep step = md.getLastStep();
                        if (step != null) {
                            position = step.getPosition();
                            facing = step.getFacing();
View Full Code Here

Examples of net.bytten.metazelda.util.Coords

            IDungeon dungeon, Room room) {
        g.setColor(Color.BLACK);
       
        for (Edge edge: room.getEdges()) {
            Room nextRoom = dungeon.get(edge.getTargetRoomId());
            Coords coords = room.getCenter(),
                   nextCoords = nextRoom.getCenter();
           
            if (nextRoom.getParent() == room) {
                drawParentEdge(g, scale, roomSize, room, nextRoom);
            }
               
            double x1 = coords.x*scale + roomSize*scale,
                   y1 = coords.y*scale + roomSize*scale,
                   x2 = nextCoords.x*scale + roomSize*scale,
                   y2 = nextCoords.y*scale + roomSize*scale;
            double sdy = Math.signum(y2-y1), sdx = Math.signum(x2-x1);
            y1 += sdy * scale*roomSize/2;
            y2 -= sdy * scale*roomSize/2;
            x1 += sdx * scale*roomSize/2;
            x2 -= sdx * scale*roomSize/2;

            if (nextRoom != null && Symbol.equals(edge.getSymbol(),
                    nextRoom.getEdge(room.id).getSymbol())) {
                // Bidirectional edge
                // avoid drawing twice:
                if (coords.compareTo(nextCoords) > 0) continue;
               
                g.drawLine((int)x1, (int)y1, (int)x2, (int)y2);
               
                double midx = (x1+x2)/2,
                       midy = (y1+y2)/2;
View Full Code Here

Examples of net.sertik.genesia.util.Coords

    // when the mouse is moved, update the hovering tile accordingly
    inputCapture.setOnMouseMoved(new EventHandler<MouseEvent>() {
      @Override
      public void handle(MouseEvent me) {
        Coords mapCoords = calcMapCoordFromMouseCoord(me.getX(), me.getY());
        if (renderer.getWorld().setHoverCoords(mapCoords)) {
          render();
        }
      }
    });

    // when the mouse is clicked, update the selected tile if there was a tile
    inputCapture.setOnMouseClicked(new EventHandler<MouseEvent>() {
      @Override
      public void handle(MouseEvent me) {
        if (me.isStillSincePress()) {
          Coords mapCoords = calcMapCoordFromMouseCoord(me.getX(), me.getY());
          if (renderer.getWorld().isPointWithinBounds(mapCoords)) {
            Tile selectedTile = renderer.getWorld().getTile(mapCoords.getX(), mapCoords.getY());
            if (selectedTileInfo.getTileNode() == null
                    || !selectedTile.equals(selectedTileInfo.getTileNode().getTile())) {
              selectedTileInfo.setTileNode(renderer.getResourceLoader().createResource(selectedTile));
            }
          }
View Full Code Here

Examples of org.fonteditor.options.coords.Coords

  private static DisplayOptions getGDOdefaults() {
    return new DisplayOptions(DEFAULT_SLANT, DEFAULT_EXPAND, DEFAULT_HINT, DEFAULT_FILL, DisplayOptionsConstants.DEFAULT_PEN, DEFAULT_COORDS);
  }

  public static DisplayOptions getGDOrender(int siz, int aa_sf_x, int aa_sf_y, Pen pen, boolean filled) {
    Coords c = new Coords((siz >> 1) * aa_sf_x, siz * aa_sf_y, siz >> 1, siz);

    return new DisplayOptions(DEFAULT_SLANT, DEFAULT_EXPAND, true, filled, pen, c);
  }
View Full Code Here

Examples of transientlibs.objects.primitives.Coords

        //mapRenderer.setView(camera);
    }

    public final void setMap(TransientAssembledMap setMap) {
        map = (TiledMapGDXContainer) setMap;       
        mapRenderer = new TransientMapRenderer(map.getTiledMapGDX().gdxMap, new Coords(positionX, positionY));
       
       
        FOVGrid = new FOVScreenGrid(map, spriteBatch);
        FOVGrid.fog = fog;
       
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.