@Override
 public void act(float delta) {
   effect.setPosition(this.getX(), this.getY()); // set to whatever x/y you
   // prefer
   effect.update(delta); // update it
   super.act(delta);
 }
Beispiel #2
0
 public void act(float delta) {
   super.act(delta);
   DelayedRemovalArray<Actor> children = this.children;
   children.begin();
   for (int i = 0, n = children.size; i < n; i++) children.get(i).act(delta);
   children.end();
 }
Beispiel #3
0
  @Override
  public void act(float delta) {
    // TODO 自動生成されたメソッド・スタブ
    if (obj.remove) remove();

    if (objDraw && !obj.draw) {
      addAction(
          sequence(
              fadeOut(.3f),
              run(
                  new Runnable() {

                    @Override
                    public void run() {
                      // TODO 自動生成されたメソッド・スタブ
                      objDraw = false;
                    }
                  })));
    }

    if (!objDraw && obj.draw) {
      objDraw = true;
      addAction(fadeIn(.3f));
    }
    super.act(delta);
  }
Beispiel #4
0
  @Override
  public void act(float delta) {
    super.act(delta);
    setX(data.x * 50);
    setY((data.y * 50) + 250);

    // animation timer
    animationTime += delta;
    if (animationTime > .25f) {
      animationTime = 0;
      if (animationFrame == 0 && animationReverse) {
        animationReverse = false;
        animationFrame = 1;
      } else if (animationFrame == 2 && !animationReverse) {
        animationReverse = true;
        animationFrame = 1;
      } else if (animationReverse) {
        animationFrame--;
      } else {
        animationFrame++;
      }
    }

    // select animation timer
    selectTimer += delta;
    if (selectTimer > 0.15f) {
      selectTimer = 0;
      selectVisible = (selectVisible ? false : true);
    }
  }
  @Override
  public void act(float delta) {
    super.act(delta);

    skeleton.setX(getX());
    skeleton.setY(getY());
    skeleton.getRootBone().setScaleX(getScaleX());
    skeleton.getRootBone().setScaleY(getScaleY());
    animationState.update(delta);
    animationState.apply(skeleton);
    skeleton.updateWorldTransform();
  }
Beispiel #6
0
 @Override
 public void act(float delta) {
   super.act(delta);
   // setRotation(getRotation() + 2f);
   if (started) {
     setX(getX() + 1);
   }
   if (greenbuttontime > 0) {
     greenbuttontime -= delta;
   }
   greenbuttonshow = greenbuttontime > 0;
 }
Beispiel #7
0
  @Override
  public void act(float delta) {

    // coordinate fix
    // TODO to STAGE COORDS for relativ coords

    float relativeX = getX();
    float relativeY = getY();
    float relativeRotation = 0;

    Group currParent = this.getParent();
    while (currParent != null) {
      relativeX += currParent.getX();
      relativeY += currParent.getY();
      relativeRotation += currParent.getRotation();
      currParent = currParent.getParent();
    }

    if (lightObject != null) {

      float yy = 0;
      float xx = 0;

      if (relativeRotation != 0) {
        xx =
            getX() * MathUtils.cosDeg(relativeRotation)
                - getY() * MathUtils.sinDeg(relativeRotation);
        yy =
            getY() * MathUtils.cosDeg(relativeRotation)
                + getX() * MathUtils.sinDeg(relativeRotation);
        yy = getY() - yy;
        xx = getX() - xx;
      }
      lightObject.setPosition(relativeX - xx, relativeY - yy);
    }
    if (dataVO.type == LightType.CONE) {
      lightObject.setDirection(direction + relativeRotation);
    }
    // debugImg.setX(relativeX);
    // debugImg.setY(relativeY);
    super.act(delta);
  }
Beispiel #8
0
 @Override
 public void act(float delta) {
   super.act(delta);
   life.update(delta);
   checkBounds();
 }
 @Override
 public void act(float delta) {
   super.act(delta);
   skeleton.setPosition(super.getX() + 40f, 230f);
 }
 @Override
 public void act(float delta) {
   super.act(delta);
 }
Beispiel #11
0
 @Override
 public void act(float delta) {
   super.act(delta);
   newAction();
 }
Beispiel #12
0
 @Override
 public void act(float delta) {
   // TODO Auto-generated method stub
   super.act(delta);
 }
Beispiel #13
0
 @Override
 public void act(float delta) {
   super.act(delta);
   setX(getX() + speed * (float) Math.cos(Math.toRadians(getRotation() + 90)));
   setY(getY() + speed * (float) Math.sin(Math.toRadians(getRotation() + 90)));
 }
 public void act(float delta) {
   super.act(delta);
   if (screenCoords.x != oldScreenCoords.x || screenCoords.y != oldScreenCoords.y) hideList();
 }