inital commit

This commit is contained in:
nora 2020-12-11 19:49:03 +01:00
parent 5b9846011c
commit 0d5397dbe3
35 changed files with 955 additions and 0 deletions

View file

@ -0,0 +1,27 @@
package objects.ships;
import core.Master;
import core.Vector2D;
import objects.GameObject;
import java.awt.*;
public class Shell extends GameObject {
public Shell(Vector2D position, Vector2D size, Vector2D velocity) {
super(position, size);
this.velocity = velocity;
}
@Override
public void draw(Graphics2D g2d, int w, Master master) {
g2d.setPaint(Color.orange);
g2d.fillOval((int) position.x, (int) position.y, (int) size.x, (int) size.y);
}
@Override
public void update(Master master) {
position.add(velocity);
}
}