use of com.watabou.utils.PointF 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;
}
});
}
use of com.watabou.utils.PointF in project pixel-dungeon-remix by NYRDS.
the class BadgeBanner method highlight.
public static void highlight(Image image, int index) {
PointF p = new PointF();
switch(index) {
case 0:
case 1:
case 2:
case 3:
p.offset(7, 3);
break;
case 4:
case 5:
case 6:
case 7:
p.offset(6, 5);
break;
case 8:
case 9:
case 10:
case 11:
p.offset(6, 3);
break;
case 12:
case 13:
case 14:
case 15:
p.offset(7, 4);
break;
case 16:
p.offset(6, 3);
break;
case 17:
p.offset(5, 4);
break;
case 18:
p.offset(7, 3);
break;
case 20:
p.offset(7, 3);
break;
case 21:
p.offset(7, 3);
break;
case 22:
p.offset(6, 4);
break;
case 23:
p.offset(4, 5);
break;
case 24:
p.offset(6, 4);
break;
case 25:
p.offset(6, 5);
break;
case 26:
p.offset(5, 5);
break;
case 27:
p.offset(6, 4);
break;
case 28:
p.offset(3, 5);
break;
case 29:
p.offset(5, 4);
break;
case 30:
p.offset(5, 4);
break;
case 31:
p.offset(5, 5);
break;
case 32:
case 33:
p.offset(7, 4);
break;
case 34:
p.offset(6, 4);
break;
case 35:
p.offset(6, 4);
break;
case 36:
p.offset(6, 5);
break;
case 37:
p.offset(4, 4);
break;
case 38:
p.offset(5, 5);
break;
case 39:
p.offset(5, 4);
break;
case 40:
case 41:
case 42:
case 43:
p.offset(5, 4);
break;
case 44:
case 45:
case 46:
case 47:
p.offset(5, 5);
break;
case 48:
case 49:
case 50:
case 51:
p.offset(7, 4);
break;
case 52:
case 53:
case 54:
case 55:
p.offset(4, 4);
break;
case 56:
p.offset(3, 7);
break;
case 57:
p.offset(4, 5);
break;
case 58:
p.offset(6, 4);
break;
case 59:
p.offset(7, 4);
break;
case 60:
case 61:
case 62:
case 63:
p.offset(4, 4);
break;
}
p.x *= image.Scale().x;
p.y *= image.Scale().y;
p.offset(-image.origin.x * (image.Scale().x - 1), -image.origin.y * (image.Scale().y - 1));
p.offset(image.point());
Speck star = new Speck();
star.reset(0, p.x, p.y, Speck.DISCOVER);
star.camera = image.camera();
image.getParent().add(star);
}
use of com.watabou.utils.PointF in project pixel-dungeon-remix by NYRDS.
the class CellEmitter method center.
public static Emitter center(int cell) {
PointF p = DungeonTilemap.tileToWorld(cell);
Emitter emitter = GameScene.emitter();
emitter.pos(p.x + DungeonTilemap.SIZE / 2, p.y + DungeonTilemap.SIZE / 2);
return emitter;
}
use of com.watabou.utils.PointF in project pixel-dungeon-remix by NYRDS.
the class CellEmitter method get.
public static Emitter get(int cell) {
PointF p = DungeonTilemap.tileToWorld(cell);
Emitter emitter = GameScene.emitter();
if (emitter != null) {
emitter.pos(p.x, p.y, DungeonTilemap.SIZE, DungeonTilemap.SIZE);
}
return emitter;
}
use of com.watabou.utils.PointF in project pixel-dungeon-remix by NYRDS.
the class CellEmitter method bottom.
public static Emitter bottom(int cell) {
PointF p = DungeonTilemap.tileToWorld(cell);
Emitter emitter = GameScene.emitter();
emitter.pos(p.x, p.y + DungeonTilemap.SIZE, DungeonTilemap.SIZE, 0);
return emitter;
}
Aggregations