coordinates

This commit is contained in:
nora 2020-12-14 08:24:26 +01:00
parent 4fb5bcc543
commit b530a5d3a5
10 changed files with 36 additions and 30 deletions

View file

@ -10,19 +10,18 @@ import java.awt.*;
/**
* A shell fired by a cannon
*/
//TODO why tf do shells not use map coords...
public class Shell extends GameObject {
public Shell(Vector2D position, Vector2D size, Vector2D velocity) {
super(position, size/*, new RectHitBox(position, size)*/);
this.velocity = velocity;
this.mainColor = Color.ORANGE;
}
@Override
public void draw(Graphics2D g2d) {
g2d.setPaint(Color.orange);
g2d.fillOval((int) position.x, (int) position.y, (int) size.x, (int) size.y);
fillOval(g2d);
}
@Override