Package com.google.gwt.maeglin89273.client

Examples of com.google.gwt.maeglin89273.client.GameDevelopment


   * @param screenHeight TODO
   * @param w
   * @param h
   */
  public CreatorPropertiesBar(int screenWidth, int screenHeight,int maxPower,int lastScore,int requiredScore) {
    super(new Point(screenWidth*7/8f-20,screenHeight*25/54f), screenWidth/4f, screenHeight*25/27f);
    this.barLength=this.powerBarLength=this.expectativePowerBarLength=this.scoreFlagPos=getHeight()*0.9;
    this.powerBarX=getRightX()-1.5;
    this.expectativePowerBarX=getRightX()-4.5;
    this.textBaselineY=(float)getHeight()*0.05f;
    this.font=ASBOTXConfigs.getCGFont((int)(screenWidth*13/360f));
 
View Full Code Here


 
  private Step[] steps;
  public TutorialManager(JsonFile configs,double gameWidth,double gameHeight,int markNum,TaskHandler[] handlers){
    this.detector=new TaskDetector(this);
   
    this.board=new StepBoard(new Point(10,10),gameWidth/2);
   
    this.taskCmpts=new StepComponent[2+(markNum<1?1:markNum)];
    this.taskCmpts[BUTTON_INDEX]=new NextStepButton(new Point(gameWidth-130,gameHeight-60),this);
    this.taskCmpts[LIST_INDEX]=new TasksList(gameWidth-185,gameHeight)
    for(int i=2;i<this.taskCmpts.length;i++){
      this.taskCmpts[i]=new BlueMark();
    }
   
View Full Code Here

   * @param h
   * @param block
   * @param definers
   */
  public AreaKey(Point p, double w, double h,String[] kinds) {
    super(p, w, h, new Point(0,0),DefinersFactory.getDefiners(kinds));
  }
View Full Code Here

    return new Circle(this.controller,position,10, this.dotColor);
  }
  public static class CircleBombDotDefiner extends BombDotDefiner{

    public CircleBombDotDefiner() {
      super(new Point(0,2*ICON_BOUNDS_PLUS_SPACING),ASBOTXConfigs.Color.BLUE);
     
    }
 
View Full Code Here

    @Override
    public void buildArea(JSONObject jsonArea) {
      JSONObject pos=jsonArea.get(POSITION).isObject();
      new ArrowArea(
          new Point(pos.get(X).isNumber().doubleValue(),
                pos.get(Y).isNumber().doubleValue()),
                Math.toRadians(jsonArea.get(ANGLE).isNumber().doubleValue()),
                jsonArea.get("r").isNumber().doubleValue());
     
    }
View Full Code Here

 
  @Override
  public void onMouseDown(MouseDownEvent event) {
    switch(event.getNativeButton()){
      case NativeEvent.BUTTON_LEFT:
        Point mP=MEngine.getMousePosition();
       
        //notify the pen is down
        creatorPanel.onPenDown(camera.ConvertToWorldPosition(mP));
        if(!creatorPanel.isAnyKeyPressed())
          grabPos=mP;
View Full Code Here

  }

  @Override
  public void onMouseUp(MouseUpEvent event) {
    if(event.getNativeButton()==NativeEvent.BUTTON_LEFT){
      Point mP=MEngine.getMousePosition();
     
      //notify the pen is up
      creatorPanel.onPenUp(camera.ConvertToWorldPosition(mP));
      if(!creatorPanel.isAnyKeyPressed()){
        worldLayer.getCamera().move(mP.delta(grabPos), false);
        grabPos=null;
      }
    }
  }
View Full Code Here

   * @see com.google.gwt.maeglin89273.game.mengine.utility.page.Page#update()
   */
  @Override
  public void update() {
    if(grabPos!=null){
      Point mP=MEngine.getMousePosition();
      worldLayer.getCamera().move(mP.delta(grabPos), true);
      grabPos.setPosition(mP);
    }
    creator.restore();
    super.update();
   
View Full Code Here

      FixtureDef triFixD=new FixtureDef();
      FixtureDef recFixD=new FixtureDef();
      PolygonShape triShape=new PolygonShape();
      PolygonShape recShape=new PolygonShape();
     
      Vector[] verticesP=new Vector[]{new Vector(rSin15,rCos15),new Vector(radius,0),new Vector(rSin15,-rCos15)};
      Vec2[] verticesW=new Vec2[3];
      for(int i=0;i<3;i++){
        verticesW[i]=CoordinateConverter.vectorPixelToWorld(verticesP[i]);
      }
      triShape.set(verticesW, verticesW.length);
      recShape.setAsBox(CoordinateConverter.scalerPixelsToWorld(hw),
          CoordinateConverter.scalerPixelsToWorld(radius*0.6) ,
          CoordinateConverter.vectorPixelToWorld(new Vector(rSin15-hw,0)),0);
     
      triFixD.isSensor=true;
      recFixD.isSensor=true;
      triFixD.shape=triShape;
      recFixD.shape=recShape;
View Full Code Here

   */
  @Override
  public void update() {
    if(grabPos!=null){
      Point mP=MEngine.getMousePosition();
      Vector v=mP.delta(grabPos);
      worldLayer.getCamera().move(v, true);
      grabPos.setPosition(mP);
     
      //detect step 1
      manager.getDetector().detect(1, v);
View Full Code Here

TOP

Related Classes of com.google.gwt.maeglin89273.client.GameDevelopment

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.