Package com.google.gwt.maeglin89273.game.ashinyballonthecross.client.core

Examples of com.google.gwt.maeglin89273.game.ashinyballonthecross.client.core.CreationDefiner


   
    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
   
View Full Code Here


    private final String font=ASBOTXConfigs.getCGFont(15);
    private final String boldFont=ASBOTXConfigs.getCGBoldFont(15);
   
    public LeaderboardTable(Point p) {
      super(p, getGameWidth(),300);
      bigLabel=new GameLabel(p, TextAlign.CENTER, TextBaseline.MIDDLE,"",
          ASBOTXConfigs.Color.GRAY, ASBOTXConfigs.getCGFont(45));
      hightlightOffset=getTopY()+15;
    }
View Full Code Here

      super(buttonPos, bounds,bounds,new SpriteBlock(3*(200+SpriteBlock.SPACING),
          chooseSpriteBlockY(ASBOTXConfigs.Utility.switchStatus(game.getLoginInfo().getStatus())),
          200,200,ASBOTXConfigs.Utility.getButtonsSpriteSheet()));
     
      if(game.getLoginInfo().isConnectionSuccess()){
        this.label=new GameLabel(labelPos,align, TextBaseline.MIDDLE,
            game.getLoginInfo().getStatus()==LoginInfo.Status.LOGGED_IN?game.getLocalPlayer().getID():"",
            labelColor, ASBOTXConfigs.getCGFont(12));
      }else{
        setEnabled(false);
      }
View Full Code Here

   * @see com.google.gwt.maeglin89273.game.mengine.component.GeneralComponent#update()
   */
  @Override
  public void update() {
   
    Physical dc;
    for(int i=contentCreations.size()-1;i>=0;i--){
      dc=contentCreations.get(i);
      if(dc.isDestroyed()){
        contentCreations.remove(i);
      }else{
        dc.getBody().applyForce(forceVec, dc.getBody().getWorldCenter());
      }
    }
  }
View Full Code Here

  @Override
  public void update(){
    Vec2 shapePos;
    Vec2 pAToShape;
    Vec2 pBToShape;
    Physical dc;
    for(int i=creationsInField.size()-1;i>=0;i--){
      dc=creationsInField.get(i);
      if(dc.isDestroyed()){
        creationsInField.remove(i);
      }else{
        shapePos=dc.getBody().getWorldCenter();
        pAToShape=shapePos.sub(vecA);
        pBToShape=shapePos.sub(vecB);
        if(Vec2.dot(pAToShape, vecAToB)<0){
          if(pAToShape.lengthSquared()>ASBOTXConfigs.E_SQUARE){
            pAToShape.negateLocal();
            pAToShape.normalize();
            pAToShape.mulLocal(FORCE_MAGNITUDE);
            dc.getBody().applyForce(pAToShape,shapePos);
          }
        }else if(Vec2.dot(pBToShape, vecBToA)<0){
          if(pBToShape.lengthSquared()>ASBOTXConfigs.E_SQUARE){
            pBToShape.negateLocal();
            pBToShape.normalize();
            pBToShape.mulLocal(FORCE_MAGNITUDE);
            dc.getBody().applyForce(pBToShape,shapePos);
          }
        }else{
          dc.getBody().applyForce(Vec2.cross(pAToShape,vecAToB)>0?forces[0]:forces[1],shapePos);
        }
      }
    }
  }
View Full Code Here

      for(int i=0;i<transX.length;i++){
        transX[i]=(i-currentIndex+1)*SPACING;
      }
     
     
      sensorButton=new BoxButton(getPosition(), 220, 220, null){
       
        @Override
        public void doTask() {
          buttons[currentIndex].doTask();
         
View Full Code Here

  private LocalPlayer localPlayer;
  private LoginInfo loginInfo;
 
  private PlayerServiceAsync playerSvc=GWT.create(PlayerService.class);
  public ASBOTXGame(){
    super(new GameInfo(720,540,ASBOTXAssetsBundleWithLookup.INSTANCE));
  }
View Full Code Here

    MEngine.addKeyDownHandler(this);
    MEngine.addMouseMoveHandler(this);
  }
  private boolean checkIsUserANewPlayer(CheckLoginResponse result){
    if(result.getStatus()==CheckLoginResponse.Status.NEW_PLAYER){
      root.insertLayer(0, new ComponentLayer(new Glass(game.getWidth(),game.getHeight())));
      root.insertLayer(0,new ComponentLayer(getBoard()));
      game.getLocalPlayer().setID(null);
      blocked=true;
      return true;
    }
    return false;
View Full Code Here

    creatorPanel.addDefiningListener(creatorPropertiesBar);
   
    //initialize layers
    worldLayer=new WorldLayer(creator.getWorld(),level.getCameraViewPoint(),2,0.45f);
    camera=worldLayer.getCamera();
    worldLayer.insertLayer(0, new ComponentLayer(manager.getBlueMark(0)));
    worldLayer.insertLayer(1,new Layer(){

      @Override
      public void update() {
        creatorPanel.updatePenPosition(camera.ConvertToWorldPosition(MEngine.getMousePosition()));
View Full Code Here

  /**
   *
   */
  protected HasLoginButtonPage(final Point buttonPos,final Point labelPos,final int buttonBounds,final TextAlign labelAlign,final CssColor textColor) {
    game=(ASBOTXGame) getGame();
    root=new GroupLayer();
   
    if(game.getLoginInfo()==null){
      game.getPlayerService().checkLogin(new CheckLoginRequest(ASBOTXConfigs.CLOSE_PAGE_PATH,game.getLocalPlayer().getPlayer()),
          new AsyncCallback<CheckLoginResponse>(){
 
View Full Code Here

TOP

Related Classes of com.google.gwt.maeglin89273.game.ashinyballonthecross.client.core.CreationDefiner

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.