v0.5.0: fixed many vfx alignment issues

This commit is contained in:
Evan Debenham
2017-01-04 19:09:54 -05:00
parent cc2b0a0cb8
commit 26daff58b2
28 changed files with 383 additions and 244 deletions

View File

@@ -147,6 +147,14 @@ public class Visual extends Gizmo {
y = p.y - height / 2;
return p;
}
//returns the point needed to center the argument visual on this visual
public PointF center( Visual v ) {
return new PointF(
x + (width() - v.width())/2f,
y + (height() - v.height())/2f
);
}
public float width() {
return width * scale.x;