package edu.stuy.starlorn.entities;

public class Projectile extends Entity {
    // Angle is radians, measured from the positive x axis
    private double _angle, _speed;

    public Projectile() {
        super();
        _angle = 0;
        _speed = 1;
    }

    @Override
    public void step() {
        setXY(getX() + (getSpeed() * Math.cos(getAngle())),
              getY() + (getSpeed() * Math.sin(getAngle())));
    }

    public void setAngle(double angle) {
        _angle = angle;
    }

    public double getAngle() {
        return _angle;
    }

    public void setSpeed(double speed) {
        _speed = speed;
    }

    public double getSpeed() {
        return _speed;
    }
}

package edu.stuy.starlorn.entities;

public class Projectile extends Entity {
    // Angle is radians, measured from the positive x axis
    private double _angle, _speed;

    public Projectile() {
        super();
        _angle = 0;
        _speed = 1;
    }

    @Override
    public void step() {
        setXY(getX() + (getSpeed() * Math.cos(getAngle())),
              getY() + (getSpeed() * Math.sin(getAngle())));
    }
    
    public boolean shouldDespawnOnCollision() {
        return false;
    }

    public void setAngle(double angle) {
        _angle = angle;
    }

    public double getAngle() {
        return _angle;
    }

    public void setSpeed(double speed) {
        _speed = speed;
    }

    public double getSpeed() {
        return _speed;
    }
}

Add shouldDespawn tag to projectiles, so we can do piercing shots
Add shouldDespawn tag to projectiles, so we can do piercing shots
