Skip to content

Commit 3d90345

Browse files
author
Slikey
committed
Finished TextEffect
1 parent 566eaad commit 3d90345

1 file changed

Lines changed: 24 additions & 1 deletion

File tree

src/de/slikey/effectlib/effect/TextLocationEffect.java

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,34 @@
1616

1717
public class TextLocationEffect extends LocationEffect {
1818

19+
/**
20+
* Particle to draw the text
21+
*/
1922
public ParticleEffect particle = ParticleEffect.FLAME;
23+
24+
/**
25+
* Text to display
26+
*/
2027
public String text = "Text";
28+
29+
/**
30+
* Invert the text
31+
*/
2132
public boolean invert = false;
33+
34+
/**
35+
* Each stepX pixel will be shown. Saves packets for lower fontsizes.
36+
*/
2237
public int stepX = 2;
38+
39+
/**
40+
* Each stepY pixel will be shown. Saves packets for lower fontsizes.
41+
*/
2342
public int stepY = 2;
43+
44+
/**
45+
* Scale the font down
46+
*/
2447
public float size = (float) 1 / 15;
2548

2649
protected final StringParser parser;
@@ -49,7 +72,7 @@ public void onRun() {
4972
else if (invert && Color.black.getRGB() == clr)
5073
continue;
5174
Vector v = new Vector(x, image.getHeight() - y, 0).multiply(size);
52-
VectorUtils.rotateAroundAxisY(v, -location.getYaw() * MathUtils.degreesToRadians);
75+
VectorUtils.rotateAroundAxisY(v, location.getYaw() * MathUtils.degreesToRadians);
5376
particle.display(location.add(v), visibleRange);
5477
location.subtract(v);
5578
}

0 commit comments

Comments
 (0)