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

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


 
  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

      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

   * @param a
   */
  public ShapesFountain(Creator creator,Point p,double a,float impulseMag) {
    super(creator, p,a);
    impulse=new Vec2((float)(impulseMag*Math.cos(-a)),(float)(impulseMag*Math.sin(-a)));
    timer=new RepeatingTimer(new TimerTask(){

      @Override
      public void doTask() {
       
        PhysicalShape shape;
View Full Code Here

    if(fadeIn){
      layer.setAlpha(layer.getAlpha()+PER_ALPHA_VALUE);
      count--;
      if(count==1){
        fadeIn=false;
        timer=new SchedulingTimer(new TimerTask(){

          @Override
          public void doTask() {
            fadeOut=true;
          }
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.