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

Examples of com.google.gwt.maeglin89273.game.mengine.timer.TimerTask


  }
  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

*/
public abstract class LineBuilder implements LevelBuilder{
  protected static final String P1="p1";
  protected static final String P2="p2";
  public void build(JSONObject creation){
    Point p1;
    Point p2;
    JSONObject point;
    point=creation.get(P1).isObject();
    p1=new Point(point.get(X).isNumber().doubleValue(),
           point.get(Y).isNumber().doubleValue());
    point=creation.get(P2).isObject();
    p2=new Point(point.get(X).isNumber().doubleValue(),
           point.get(Y).isNumber().doubleValue());
    this.buildLine( p1, p2);
  }
View Full Code Here

   * @param w
   * @param h
   * @param block
   */
  public DotKey(Point p, double w, double h,String[] kinds) {
    super(p, w, h,new Point(400+2*SpriteBlock.SPACING,0),DefinersFactory.getDefiners(kinds));
   
  }
 
View Full Code Here

   * @param w
   * @param h
   * @param kinds
   */
  public LineKey(Point p,double w,double h,String[] kinds){
    super(p, w, h, new Point(200+SpriteBlock.SPACING,0),DefinersFactory.getDefiners(kinds));
  }
View Full Code Here

  public static class MagneticLineDefiner extends StaticLineDefiner{

    public MagneticLineDefiner() {
       
      super(ASBOTXConfigs.CreationPowerComsumption.MAGNETIC_LINE,
          new Point(3*ICON_BOUNDS_PLUS_SPACING,ICON_BOUNDS_PLUS_SPACING), null);
     
    }
View Full Code Here

TOP

Related Classes of com.google.gwt.maeglin89273.game.mengine.timer.TimerTask

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.