forked from SteamWar/SteamWar
Add colour along the wing and sparkle to lobby wings
Both wing designs can colour their points from the spine to the tips instead of changing colour over time, and a sparkle setting shows only a share of the points each tick, which also lowers their cost. The angel and phoenix drawn shapes are removed.
This commit is contained in:
@@ -43,6 +43,8 @@ public class ParticleTickData {
|
||||
private boolean onlyOthers = false;
|
||||
// Set for entries placed relative to the body, null for world placement
|
||||
private BodyFrame frame;
|
||||
// Where a point sits along its shape, from 0 to 1; when set, gradients colour by it instead of by time
|
||||
private Double shade;
|
||||
|
||||
public ParticleTickData withLocation(Location location) {
|
||||
ParticleTickData particleTickData = copy();
|
||||
@@ -57,6 +59,17 @@ public class ParticleTickData {
|
||||
return particleTickData;
|
||||
}
|
||||
|
||||
public ParticleTickData withShade(double shade) {
|
||||
ParticleTickData particleTickData = copy();
|
||||
particleTickData.shade = shade;
|
||||
return particleTickData;
|
||||
}
|
||||
|
||||
// The gradient position for this tick: along the shape when a shade is set, otherwise moving with time
|
||||
public double gradientPosition() {
|
||||
return shade != null ? Math.min(shade, 0.9999) * 360 : (deg * 10) % 360;
|
||||
}
|
||||
|
||||
public ParticleTickData onlySelf() {
|
||||
ParticleTickData particleTickData = copy();
|
||||
particleTickData.onlySelf = true;
|
||||
@@ -77,6 +90,6 @@ public class ParticleTickData {
|
||||
}
|
||||
|
||||
public ParticleTickData copy() {
|
||||
return new ParticleTickData(world, player, location, deg, isMoving, viewers, onlySelf, onlyOthers, frame);
|
||||
return new ParticleTickData(world, player, location, deg, isMoving, viewers, onlySelf, onlyOthers, frame, shade);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user