v0.8.0: fixed various errors with resized enemy sprites

This commit is contained in:
Evan Debenham
2019-10-29 19:51:00 -04:00
parent c803537ecd
commit 1539d57f71
4 changed files with 12 additions and 12 deletions

View File

@@ -138,12 +138,12 @@ public class Visual extends Gizmo {
}
public PointF center() {
return new PointF( x + width / 2, y + height / 2 );
return new PointF( x + width() / 2, y + height() / 2 );
}
public PointF center( PointF p ) {
x = p.x - width / 2;
y = p.y - height / 2;
x = p.x - width() / 2;
y = p.y - height() / 2;
return p;
}