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

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


  /* (non-Javadoc)
   * @see com.google.gwt.maeglin89273.game.mengine.page.Page#onScreen()
   */
  @Override
  public void onScreen() {
    button=new WelcomeButton(new Point(25,25),50);
    menu=new WorldMenu(new Point(getGameWidth()/2,getGameHeight()/2),game.getLocalPlayer().getMenuIndex());
   
    root.addComponentOnLayer(button);
    root.addComponentOnLayer(menu);
    root.addLayer(new ImageLayer(MEngine.getAssetManager().getSpriteSheet("images/blue_bg.png"), 720, 540));
  }
View Full Code Here


    private RollerControlButton[] buttons=new RollerControlButton[2];
    private ButtonsRoller roller;
    protected WorldMenu(Point p,int index) {
      super(p, getGameWidth(),250);
      roller=new ButtonsRoller(getPosition(),getWidth(),getHeight(),index);
      buttons[0]=new RollerControlButton(new Point(getLeftX()+30,getY()),roller,true);
      buttons[1]=new RollerControlButton(new Point(getRightX()-30,getY()),roller,false);
    }
View Full Code Here

 
 
  public static class ArrowAreaDefiner extends CircleKindAreaDefiner{
    private final SpriteBlock block=new SpriteBlock(0,0,250,250,MEngine.getAssetManager().getSpriteSheet("images/areas.png"));
    public ArrowAreaDefiner() {
      super(ASBOTXConfigs.CreationPowerComsumption.ARROW_AREA,new Point(0,0),60,20);
    }
View Full Code Here

    }
   
  }
  private abstract class BigButton extends BoxButton{
    public BigButton(double bounds,int x) {
      super(new Point(0,0), bounds, bounds, new SpriteBlock(x,0,250,250,MEngine.getAssetManager().getSpriteSheet("images/big_buttons.png")));
    }
View Full Code Here

  }
  public static class TriangleAreaDefiner extends TriangleKindAreaDefiner{

    public TriangleAreaDefiner() {
       
      super(ASBOTXConfigs.CreationPowerComsumption.TRIANGLE_AREA, new Point(2*ICON_BOUNDS_PLUS_SPACING,0));
     
    }
 
View Full Code Here

 
  /**
   *
   */
  public LeaderboardPage() {
    super(new Point(getGameWidth()-50,getGameHeight()-50),new Point(3,108),100,
    TextAlign.LEFT,ASBOTXConfigs.Color.BORDER_DARK_GRAY);
  }
View Full Code Here

   * @see com.google.gwt.maeglin89273.game.mengine.page.Page#onScreen()
   */
  @Override
  public void onScreen() {
   
    buttons[0]=new BackButton(new Point(55,getGameHeight()-60), 50);
    buttons[1]=new RefreshButton(new Point(getGameWidth()/2,getGameHeight()-60),50);
   
    table=new LeaderboardTable(new Point(getGameWidth()/2,getGameHeight()/2));
    progressLabel=new GameLabel(new Point(getGameWidth()/2,108), TextAlign.CENTER, TextBaseline.MIDDLE,
        "", ASBOTXConfigs.Color.BORDER_DARK_GRAY, ASBOTXConfigs.getCGFont(12));
    totalLabel=new GameLabel(new Point(getGameWidth()-3,108), TextAlign.RIGHT, TextBaseline.MIDDLE,
        "Total "+game.getLocalPlayer().getTotal(), ASBOTXConfigs.Color.BORDER_DARK_GRAY,
        ASBOTXConfigs.getCGFont(12));
   
    //put the components on root
   
    for(int i=0;i<buttons.length;i++){
      root.addComponentOnLayer(buttons[i]);
    }
    root.addComponentOnLayer(table);
    root.addComponentOnLayer(progressLabel);
    root.addComponentOnLayer(totalLabel);
    root.addLayer(new ImageLayer(MEngine.getAssetManager().getSpriteSheet("images/leaderboard.png"),
        new Point(0,0), getGameWidth(), getGameHeight()));
   
    //connect to the server
    table.showText("Connecting...");
    reconnect();
  }
View Full Code Here

    loginButton=new LoginButtonAndIDDisplay(buttonPos, labelPos, buttonBounds,labelAlign, textColor);
    root.addComponentOnLayer(loginButton);
  }
  private IDEnteredBoard getBoard(){
    if(board==null){
      board=new IDEnteredBoard(new Point(game.getWidth()/2,game.getHeight()/2));
    }
    return board;
  }
View Full Code Here

  /* (non-Javadoc)
   * @see com.google.gwt.event.dom.client.ClickHandler#onClick(com.google.gwt.event.dom.client.ClickEvent)
   */
  @Override
  public void onClick(ClickEvent event) {
    Point p=MEngine.getMousePosition();
    if(blocked){
      getBoard().getButton().onClick(p);
    }else{
      if(loginButton==null||!loginButton.onClick(p)){
        onClick(p);
View Full Code Here

    super(0, p, 15*(1+SQRT_2), 15*(1+SQRT_2/2), angle);
   
    this.defaultColor = this.color = defaultColor;
    this.contactColor = contactColor;
   
    Point tlP=this.getPositionAt(PositionType.NORTHWEST);
    Point trP=this.getPositionAt(PositionType.NORTHEAST);
    Point crossP=new Point(getX(),getTopY()+getWidth()/2);
    Point bmP=this.getPositionAt(PositionType.SOUTH);
    Point blP=bmP.clone();
    Point brP=bmP.clone();
    blP.translate(-7.5f, 0);
    brP.translate(7.5f, 0);
    points=Point.getRotatedPoint(getPosition(), getAngle(),tlP,trP,crossP,bmP,blP,brP);
   
    Vec2 crossV=CoordinateConverter.vectorPixelToWorld(position.delta(crossP));
   
    BodyDef bodyD=new BodyDef();
View Full Code Here

TOP

Related Classes of com.google.gwt.maeglin89273.game.mengine.physics.Vector

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.