Examples of modifyX()


Examples of com.googlecode.jumpnevolve.math.Vector.modifyX()

  public Vector limitPosition(Vector position, World world) {
    int halfScreenWidth = Engine.getInstance().getWidth() / 2, halfScreenHeight = Engine
        .getInstance().getHeight() / 2;
    Vector re = position;
    if (position.x < halfScreenWidth) {
      re = re.modifyX(halfScreenWidth);
    }
    if (position.y < halfScreenHeight) {
      re = re.modifyY(halfScreenHeight);
    }
    if (position.x > world.width - halfScreenWidth) {
View Full Code Here

Examples of com.googlecode.jumpnevolve.math.Vector.modifyX()

    }
    if (position.y < halfScreenHeight) {
      re = re.modifyY(halfScreenHeight);
    }
    if (position.x > world.width - halfScreenWidth) {
      re = re.modifyX(world.width - halfScreenWidth);
    }
    if (position.y > world.height - halfScreenHeight) {
      re = re.modifyY(world.height - halfScreenHeight);
    }
    return re;
View Full Code Here

Examples of com.googlecode.jumpnevolve.math.Vector.modifyX()

            this.cameraMove = true;
            if (this.oldClick == null) {
              this.oldClick = mousePos;
            }
            Vector dif = mousePos.sub(oldClick);
            dif = dif.modifyX(dif.x / this.getZoomX());
            dif = dif.modifyY(dif.y / this.getZoomY());
            this.setCameraPosition(this.oldCameraPos.sub(dif));
          }
        } else {
          this.cameraMove = false;
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.