Examples of WorldPos


Examples of net.sf.fysix.leveleditor.tool.position.WorldPos

    if(wpY<0 || wpY>9999){ // TODO: FIX MAP SIZE (worldsize)!!!
      System.out.println("2.NO VALID POS x : " + wpX + " , y : " + wpY);
      return null;
    }
   
    return new WorldPos(wpX, wpY);
  }
View Full Code Here

Examples of net.sf.fysix.leveleditor.tool.position.WorldPos

  public List<IMapObject> getIMapObjects(){
    return mapObjects;
  }
   
  public void mouseDragged(MouseEvent e) {
    WorldPos wp = translateToWorldPos(e.getX(), e.getY());
    if(wp == null){ return; }
    leTool.onMouseDrag(wp, e);
  }
View Full Code Here

Examples of net.sf.fysix.leveleditor.tool.position.WorldPos

    if(wp == null){ return; }
    leTool.onMouseDrag(wp, e);
  }

  public void mouseMoved(MouseEvent e) {
    WorldPos wp = translateToWorldPos(e.getX(), e.getY());
    if(wp == null){ return; }
    leTool.onMouseMove(wp, e);
  }
View Full Code Here

Examples of net.sf.fysix.leveleditor.tool.position.WorldPos

    if(wp == null){ return; }
    leTool.onMouseMove(wp, e);
  }
 
  public void mouseClicked(MouseEvent e) {
    WorldPos wp = translateToWorldPos(e.getX(), e.getY());
    if(wp == null){ return; }
    leTool.onMouseClick(wp, e);
  }
View Full Code Here

Examples of net.sf.fysix.leveleditor.tool.position.WorldPos

    if(wp == null){ return; }
    leTool.onMouseClick(wp, e);
  }

  public void mouseEntered(MouseEvent e) {
    WorldPos wp = translateToWorldPos(e.getX(), e.getY());
    if(wp == null){ return; }
    // ...
  }
View Full Code Here

Examples of net.sf.fysix.leveleditor.tool.position.WorldPos

    if(wp == null){ return; }
    // ...
  }

  public void mouseExited(MouseEvent e) {
    WorldPos wp = translateToWorldPos(e.getX(), e.getY());
    if(wp == null){ return; }
    // ...
  }
View Full Code Here

Examples of net.sf.fysix.leveleditor.tool.position.WorldPos

    if(wp == null){ return; }
    // ...
  }

  public void mousePressed(MouseEvent e) {
    WorldPos wp = translateToWorldPos(e.getX(), e.getY());
    if(wp == null){ return; }
    leTool.onMouseDown(wp, e);
  }
View Full Code Here

Examples of net.sf.fysix.leveleditor.tool.position.WorldPos

    if(wp == null){ return; }
    leTool.onMouseDown(wp, e);
  }

  public void mouseReleased(MouseEvent e) {
    WorldPos wp = translateToWorldPos(e.getX(), e.getY());
    if(wp == null){ return; }
    leTool.onMouseUp(wp, e);
  }
View Full Code Here

Examples of net.sf.fysix.leveleditor.tool.position.WorldPos

        }
    }
   
    public void moveShape(WorldPos diff, WorldPos toPos) {
        for (int i = 0; i < vertices.size(); i++) {
          WorldPos vertex = (WorldPos)vertices.get(i);
            vertex.setPosition(vertex.getX()-diff.getX()+toPos.getX(), vertex.getY()-diff.getY()+toPos.getY());
        }
        recalcBoundingBox();
        update();
    }
View Full Code Here

Examples of net.sf.fysix.leveleditor.tool.position.WorldPos

        int maxX = -9999;
        int minY = 9999;
        int maxY = -9999;
       
        for (int i = 0; i < vertices.size(); i++) {
          WorldPos vertex = (WorldPos)vertices.get(i);
          minX = Math.min(vertex.getX(), minX);
          minY = Math.min(vertex.getY(), minY);
          maxX = Math.max(vertex.getX(), maxX);
          maxY = Math.max(vertex.getY(), maxY);
        }

        if (minX != 9999 && maxX != -9999 && minY != 9999 && maxY != -9999) {
            NW = new WorldPos(minX, minY);
            SE = new WorldPos(maxX, maxY);

            setPosition(NW);
            System.out.println(" NW : x = " + NW.getX() + " ,y = " + NW.getY());
        }
    }
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.