Package org.newdawn.slick.geom

Examples of org.newdawn.slick.geom.Point


    {
      hp = hp_default;
      x = Game.getAppX()+30+(new Random().nextInt(20));
      hitbox = new Rectangle(x-width, y-height, width, height); //setting hitbox
      hitbox_crit = new Rectangle(x-width+7, y-height+2, 9, 9);
      center = new Point(x-(float)width/2, y+(float)height/2);
      updateFacing();
    }
View Full Code Here


    gun.setCenterOfRotation(2, 2); //do not move gun to gun and gun_f to gun_f
    gun_f.setCenterOfRotation(24, 2);
    /*strange bug:
     * center of rotation to gun wouldn't set cause image wouldn't be loaded in time
     */
    gun_point = new Point(GameplayState.player.getX(), GameplayState.player.getY()+5);
  }
View Full Code Here

          int blockWidth = (int)b.getRect().getWidth();
          int blockTop = (int)b.getRect().getMinY();
          int blockBottom = blockTop + blockHeight;
          int blockRight = blockLeft + blockWidth;

          Point pointRight = new Point(ballLeft + ballWidth + 1, ballTop + ballHeight/2);
          Point pointLeft = new Point(ballLeft - 1, ballTop + ballHeight/2);
          Point pointTop = new Point(ballLeft + ballWidth/2, ballTop - 1);
          Point pointBottom = new Point(ballLeft + ballWidth/2, ballTop + ballHeight + 1);
          Point topLeftCorner = new Point(ballLeft - 1, ballTop);
          Point topRightCorner = new Point(ballLeft + ballWidth + 1, ballTop);
          Point bottomLeftCorner = new Point(ballLeft - 1, ballTop + ballHeight);
          Point bottomRightCorner = new Point(ballLeft + ballWidth + 1, ballTop + ballHeight);
         
         

          if (b.getRect().contains(pointRight)) {
                ball.accelX *= -1;
View Full Code Here

TOP

Related Classes of org.newdawn.slick.geom.Point

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.