Heart shaped wings

This commit is contained in:
LCastr0 2017-01-27 17:40:35 -02:00
parent e2de60971e
commit 2cfd51e38e
2 changed files with 33 additions and 4 deletions

View File

@ -83,6 +83,22 @@ public class ShapeWings extends ShapeGrid implements CosmeticShape
"000$#$00$#$000",
"0000$0000$0000"
};
public static final String[] HEART_WING_PATTERN = new String[]
{
"00$00000000000000000$00",
"0$%$000000000000000$%$0",
"$%%%$$00$$000$$00$$%%%$",
"$%%%%%$$##$0$##$$%%%%%$",
"$%%%%%$####$####$%%%%%$",
"0$%%%%$#########$%%%%$0",
"00$%%%$#########$%%%$00",
"000$%%$$#######$$%%$000",
"0000$$00$#####$00$$0000",
"000000000$###$000000000",
"0000000000$#$0000000000",
"00000000000$00000000000"
};
/**
@ -180,6 +196,16 @@ public class ShapeWings extends ShapeGrid implements CosmeticShape
rotateOnXAxis(xRotation);
}
public ShapeWings(String particle, Vector offsetData, float speed, int count, char c, double xRotation, String... pattern)
{
super(0.15, c, pattern);
_particle = particle;
_offsetData = offsetData;
_speed = speed;
_count = count;
rotateOnXAxis(xRotation);
}
@Override
public void display(Location loc)
{

View File

@ -20,8 +20,9 @@ import mineplex.core.updater.event.UpdateEvent;
public class ParticleWingsLove extends ParticleGadget
{
private ShapeWings _wings = new ShapeWings(UtilParticle.ParticleType.RED_DUST.particleName, new Vector(1, 1, 1), 1, 0, false, ShapeWings.DEFAULT_ROTATION, ShapeWings.BUTTERFLY_WING_PATTERN);
private ShapeWings _wingsEdge = new ShapeWings(UtilParticle.ParticleType.RED_DUST.particleName, new Vector(0, 0, 0), 0, 0, true, ShapeWings.DEFAULT_ROTATION, ShapeWings.BUTTERFLY_WING_PATTERN);
private ShapeWings _wings = new ShapeWings(UtilParticle.ParticleType.RED_DUST.particleName, new Vector(1, 1, 1), 1, 0, false, ShapeWings.DEFAULT_ROTATION, ShapeWings.HEART_WING_PATTERN);
private ShapeWings _wingsWhite = new ShapeWings(UtilParticle.ParticleType.RED_DUST.particleName, new Vector(1, 1, 1), 1, 0, '%', ShapeWings.DEFAULT_ROTATION, ShapeWings.HEART_WING_PATTERN);
private ShapeWings _wingsEdge = new ShapeWings(UtilParticle.ParticleType.RED_DUST.particleName, new Vector(1, 1, 1), 1, 0, true, ShapeWings.DEFAULT_ROTATION, ShapeWings.HEART_WING_PATTERN);
public ParticleWingsLove(GadgetManager manager)
{
@ -39,13 +40,15 @@ public class ParticleWingsLove extends ParticleGadget
if (event.getType() == UpdateType.TICK)
{
_wings.displayColoredParticle(loc, Color.PINK);
_wingsEdge.displayParticle(loc);
_wingsWhite.displayColoredParticle(loc, Color.WHITE);
_wingsEdge.displayColoredParticle(loc, Color.BLACK);
}
return;
}
if (event.getType() == UpdateType.SEC) UtilParticle.PlayParticle(UtilParticle.ParticleType.HEART, player.getLocation(), 0.75f, 0.75f, 0.75f, 0.5f, 7, UtilParticle.ViewDist.NORMAL);
if (event.getType() == UpdateType.FAST) _wings.displayColored(loc, Color.PINK);
if (event.getType() == UpdateType.FAST) _wingsEdge.displayColored(loc, Color.PINK);
if (event.getType() == UpdateType.FAST) _wingsWhite.displayColored(loc, Color.WHITE);
if (event.getType() == UpdateType.FAST) _wingsEdge.displayColored(loc, Color.BLACK);
}
}