Search in sources :

Example 1 with ScaleTweener

use of com.watabou.noosa.tweeners.ScaleTweener in project pixel-dungeon-remix by NYRDS.

the class MobSprite method fall.

public void fall() {
    origin.set(width / 2, height - DungeonTilemap.SIZE / 2);
    angularSpeed = Random.Int(2) == 0 ? -720 : 720;
    getParent().add(new ScaleTweener(this, new PointF(0, 0), FALL_TIME) {

        @Override
        protected void onComplete() {
            MobSprite.this.killAndErase();
        }

        @Override
        protected void updateValues(float progress) {
            super.updateValues(progress);
            am = 1 - progress;
        }
    });
}
Also used : ScaleTweener(com.watabou.noosa.tweeners.ScaleTweener) PointF(com.watabou.utils.PointF)

Example 2 with ScaleTweener

use of com.watabou.noosa.tweeners.ScaleTweener in project pixel-dungeon by watabou.

the class MobSprite method fall.

public void fall() {
    origin.set(width / 2, height - DungeonTilemap.SIZE / 2);
    angularSpeed = Random.Int(2) == 0 ? -720 : 720;
    parent.add(new ScaleTweener(this, new PointF(0, 0), FALL_TIME) {

        @Override
        protected void onComplete() {
            MobSprite.this.killAndErase();
            parent.erase(this);
        }

        @Override
        protected void updateValues(float progress) {
            super.updateValues(progress);
            am = 1 - progress;
        }
    });
}
Also used : ScaleTweener(com.watabou.noosa.tweeners.ScaleTweener) PointF(com.watabou.utils.PointF)

Example 3 with ScaleTweener

use of com.watabou.noosa.tweeners.ScaleTweener in project shattered-pixel-dungeon-gdx by 00-Evan.

the class TerrainFeaturesTilemap method growPlant.

public void growPlant(final int pos) {
    final Image plant = tile(pos, map[pos]);
    if (plant == null)
        return;
    plant.origin.set(8, 12);
    plant.scale.set(0);
    plant.point(DungeonTilemap.tileToWorld(pos));
    parent.add(plant);
    parent.add(new ScaleTweener(plant, new PointF(1, 1), 0.2f) {

        protected void onComplete() {
            plant.killAndErase();
            killAndErase();
            updateMapCell(pos);
        }
    });
}
Also used : ScaleTweener(com.watabou.noosa.tweeners.ScaleTweener) PointF(com.watabou.utils.PointF) Image(com.watabou.noosa.Image)

Example 4 with ScaleTweener

use of com.watabou.noosa.tweeners.ScaleTweener in project shattered-pixel-dungeon-gdx by 00-Evan.

the class MobSprite method fall.

public void fall() {
    origin.set(width / 2, height - DungeonTilemap.SIZE / 2);
    angularSpeed = Random.Int(2) == 0 ? -720 : 720;
    parent.add(new ScaleTweener(this, new PointF(0, 0), FALL_TIME) {

        @Override
        protected void onComplete() {
            MobSprite.this.killAndErase();
            parent.erase(this);
        }

        @Override
        protected void updateValues(float progress) {
            super.updateValues(progress);
            am = 1 - progress;
        }
    });
}
Also used : ScaleTweener(com.watabou.noosa.tweeners.ScaleTweener) PointF(com.watabou.utils.PointF)

Example 5 with ScaleTweener

use of com.watabou.noosa.tweeners.ScaleTweener in project pixel-dungeon-remix by NYRDS.

the class LevelObjectSprite method fall.

public void fall() {
    origin.set(width / 2, height - DungeonTilemap.SIZE / 2);
    angularSpeed = Random.Int(2) == 0 ? -720 : 720;
    getParent().add(new ScaleTweener(this, new PointF(0, 0), 1f) {

        @Override
        protected void onComplete() {
            LevelObjectSprite.this.killAndErase();
        }

        @Override
        protected void updateValues(float progress) {
            super.updateValues(progress);
            am = 1 - progress;
        }
    });
}
Also used : ScaleTweener(com.watabou.noosa.tweeners.ScaleTweener) PointF(com.watabou.utils.PointF)

Aggregations

ScaleTweener (com.watabou.noosa.tweeners.ScaleTweener)5 PointF (com.watabou.utils.PointF)5 Image (com.watabou.noosa.Image)1