Package com.google.gwt.maeglin89273.game.mengine.physics

Examples of com.google.gwt.maeglin89273.game.mengine.physics.Point


    }
  }
  public static class GravitationalAreaDefiner extends CircleKindAreaDefiner{

    public GravitationalAreaDefiner() {
      super(ASBOTXConfigs.CreationPowerComsumption.GRAVITATIONAL_AREA,new Point(ICON_BOUNDS_PLUS_SPACING,0),85,20);
    }
View Full Code Here


 
  protected double angle;
 
  protected final Point position=new Point(0,0);
  protected GeneralComponent(Point p,double angle,double w,double h){
    this.position.setPosition(p==null?new Point(0,0):p);
    this.angle=angle;
    this.setWidth(w);
    this.setHeight(h);
   
  }
View Full Code Here

  }
  @Override
  public Point getPositionAt(PositionType type){
    switch(type){
    case NORTHWEST:
      return new Point(position.getX()-width/2,position.getY()-height/2);
    case NORTH:
      return new Point(position.getX(),position.getY()-height/2);
    case NORTHEAST:
      return new Point(position.getX()+width/2,position.getY()-height/2);
    case WEST:
      return new Point(position.getX()-width/2,position.getY());
    case CENTER:
      return position.clone();
    case EAST:
      return new Point(position.getX()+width/2,position.getY());
    case SOUTHWEST:
      return new Point(position.getX()-width/2,position.getY()+height/2);
    case SOUTH:
      return new Point(position.getX(),position.getY()+height/2);
    case SOUTHEAST:
      return new Point(position.getX()+width/2,position.getY()+height/2);
    default:
      throw new IllegalArgumentException("Wrong dirction argument.");
    }
  }
View Full Code Here

   * @see com.google.gwt.maeglin89273.shared.core.Game#update(float)
   */
  @Override
  public void update() {
    if(grabPoint!=null){
      Point mP=MEngine.getMousePosition();
      layer.getCamera().move(mP.delta(grabPoint), true);
      grabPoint.setPosition(mP);
    }
    layer.update();
  }
View Full Code Here

 
  @Override
  public Point getPositionAt(PositionType type){
    switch(type){
    case NORTHWEST:
      return new Point(position.getX()-width/2,position.getY()-height/2);
    case NORTH:
      return new Point(position.getX(),position.getY()-height/2);
    case NORTHEAST:
      return new Point(position.getX()+width/2,position.getY()-height/2);
    case WEST:
      return new Point(position.getX()-width/2,position.getY());
    case CENTER:
      return new Point(position);
    case EAST:
      return new Point(position.getX()+width/2,position.getY());
    case SOUTHWEST:
      return new Point(position.getX()-width/2,position.getY()+height/2);
    case SOUTH:
      return new Point(position.getX(),position.getY()+height/2);
    case SOUTHEAST:
      return new Point(position.getX()+width/2,position.getY()+height/2);
    default:
      throw new IllegalArgumentException("Wrong dirction argument.");
    }
  }
View Full Code Here

  public Point3D get3DPosition() {
    return position;
  }
  @Override
  public Point getPosition(){
    return new Point(position);
  }
View Full Code Here

    super(nextPage);
    this.layer=img;
  }
  public FadingPage(String sheetPath,int imgWidthInGame,int imgHeightInGame,Page nextPage) {
    this(new ImageLayer(MEngine.getAssetManager().getSpriteSheet(sheetPath),
      new Point((getGame().getGameInfo().getWidth()-imgWidthInGame)/2,
            (getGame().getGameInfo().getHeight()-imgHeightInGame)/2),
             imgWidthInGame,imgHeightInGame),nextPage);
       
  }
View Full Code Here

  private Body body;
  private CssColor ballColor;
  private CssColor ballShadowColor;
  private Spacial space;
  public FireBall(Spacial space,Point p,int radius){
    super(new Point(p.getX(),p.getY()-radius),radius*2,radius*2);
   
    this.radius=radius;
    double h=5+Random.nextInt(21);
    double s=80+Random.nextInt(21);
    double l=35+Random.nextInt(16);
View Full Code Here

  }
  Camera(GameComponent s,float maxScale){
    this(s, s.getPosition(), maxScale,0);
  }
  Camera(GameComponent s,Point p,float maxScale,float minScale) {
    this(new WorldBounds(new Point(s.getLeftX(),s.getTopY()),s.getWidth(),s.getHeight()), p, maxScale,minScale);
   
  }
View Full Code Here

  Camera(GameComponent s,Point p,float maxScale,float minScale) {
    this(new WorldBounds(new Point(s.getLeftX(),s.getTopY()),s.getWidth(),s.getHeight()), p, maxScale,minScale);
   
  }
  Camera(WorldBounds bounds,float maxScale) {
    this(bounds,new Point(bounds.getWidth()/2+ bounds.getX(),bounds.getHeight()+bounds.getY()),maxScale,0);
  }
View Full Code Here

TOP

Related Classes of com.google.gwt.maeglin89273.game.mengine.physics.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.