Search in sources :

Example 1 with Parallel

use of su.levenetc.android.textsurface.animations.Parallel in project TextSurface by elevenetc.

the class CookieThumperSample method play.

public static void play(TextSurface textSurface, AssetManager assetManager) {
    final Typeface robotoBlack = Typeface.createFromAsset(assetManager, "fonts/Roboto-Black.ttf");
    Paint paint = new Paint();
    paint.setAntiAlias(true);
    paint.setTypeface(robotoBlack);
    Text textDaai = TextBuilder.create("Daai").setPaint(paint).setSize(64).setAlpha(0).setColor(Color.WHITE).setPosition(Align.SURFACE_CENTER).build();
    Text textBraAnies = TextBuilder.create("bra Anies").setPaint(paint).setSize(44).setAlpha(0).setColor(Color.RED).setPosition(Align.BOTTOM_OF, textDaai).build();
    Text textFokkenGamBra = TextBuilder.create(" hy's n fokken gam bra.").setPaint(paint).setSize(44).setAlpha(0).setColor(Color.RED).setPosition(Align.RIGHT_OF, textBraAnies).build();
    Text textHaai = TextBuilder.create("Haai!!").setPaint(paint).setSize(74).setAlpha(0).setColor(Color.RED).setPosition(Align.BOTTOM_OF, textFokkenGamBra).build();
    Text textDaaiAnies = TextBuilder.create("Daai Anies").setPaint(paint).setSize(44).setAlpha(0).setColor(Color.WHITE).setPosition(Align.BOTTOM_OF | Align.CENTER_OF, textHaai).build();
    Text texThyLamInnie = TextBuilder.create(" hy lam innie mang ja.").setPaint(paint).setSize(44).setAlpha(0).setColor(Color.WHITE).setPosition(Align.RIGHT_OF, textDaaiAnies).build();
    Text textThrowDamn = TextBuilder.create("Throw damn").setPaint(paint).setSize(44).setAlpha(0).setColor(Color.RED).setPosition(Align.BOTTOM_OF | Align.CENTER_OF, texThyLamInnie).build();
    Text textDevilishGang = TextBuilder.create("devilish gang").setPaint(paint).setSize(44).setAlpha(0).setColor(Color.RED).setPosition(Align.BOTTOM_OF | Align.CENTER_OF, textThrowDamn).build();
    Text textSignsInTheAir = TextBuilder.create("signs in the air.").setPaint(paint).setSize(44).setAlpha(0).setColor(Color.RED).setPosition(Align.BOTTOM_OF | Align.CENTER_OF, textDevilishGang).build();
    textSurface.play(new Sequential(ShapeReveal.create(textDaai, 750, SideCut.show(Side.LEFT), false), new Parallel(ShapeReveal.create(textDaai, 600, SideCut.hide(Side.LEFT), false), new Sequential(Delay.duration(300), ShapeReveal.create(textDaai, 600, SideCut.show(Side.LEFT), false))), new Parallel(new TransSurface(500, textBraAnies, Pivot.CENTER), ShapeReveal.create(textBraAnies, 1300, SideCut.show(Side.LEFT), false)), Delay.duration(500), new Parallel(new TransSurface(750, textFokkenGamBra, Pivot.CENTER), Slide.showFrom(Side.LEFT, textFokkenGamBra, 750), ChangeColor.to(textFokkenGamBra, 750, Color.WHITE)), Delay.duration(500), new Parallel(TransSurface.toCenter(textHaai, 500), Rotate3D.showFromSide(textHaai, 750, Pivot.TOP)), new Parallel(TransSurface.toCenter(textDaaiAnies, 500), Slide.showFrom(Side.TOP, textDaaiAnies, 500)), new Parallel(TransSurface.toCenter(texThyLamInnie, 750), Slide.showFrom(Side.LEFT, texThyLamInnie, 500)), Delay.duration(500), new Parallel(new TransSurface(1500, textSignsInTheAir, Pivot.CENTER), new Sequential(new Sequential(ShapeReveal.create(textThrowDamn, 500, Circle.show(Side.CENTER, Direction.OUT), false)), new Sequential(ShapeReveal.create(textDevilishGang, 500, Circle.show(Side.CENTER, Direction.OUT), false)), new Sequential(ShapeReveal.create(textSignsInTheAir, 500, Circle.show(Side.CENTER, Direction.OUT), false)))), Delay.duration(200), new Parallel(ShapeReveal.create(textThrowDamn, 1500, SideCut.hide(Side.LEFT), true), new Sequential(Delay.duration(250), ShapeReveal.create(textDevilishGang, 1500, SideCut.hide(Side.LEFT), true)), new Sequential(Delay.duration(500), ShapeReveal.create(textSignsInTheAir, 1500, SideCut.hide(Side.LEFT), true)), Alpha.hide(texThyLamInnie, 1500), Alpha.hide(textDaaiAnies, 1500))));
}
Also used : TransSurface(su.levenetc.android.textsurface.animations.TransSurface) Sequential(su.levenetc.android.textsurface.animations.Sequential) Typeface(android.graphics.Typeface) Text(su.levenetc.android.textsurface.Text) Paint(android.graphics.Paint) Parallel(su.levenetc.android.textsurface.animations.Parallel)

Aggregations

Paint (android.graphics.Paint)1 Typeface (android.graphics.Typeface)1 Text (su.levenetc.android.textsurface.Text)1 Parallel (su.levenetc.android.textsurface.animations.Parallel)1 Sequential (su.levenetc.android.textsurface.animations.Sequential)1 TransSurface (su.levenetc.android.textsurface.animations.TransSurface)1