import { SimProjectile } from "../Simulation/index.js";
import { Vector2 } from "../Util/index.js";

export class VisProjectile {
    private _positions: Vector2[];
    private _simProjectile: SimProjectile;

    constructor(simProjectile: SimProjectile) {
        this._simProjectile = simProjectile;
        this._positions = [simProjectile.position, simProjectile.position];
    }

    public get positions(): Vector2[] {
        return this._positions;
    }

    public advanceStep() {
        this._positions = [this._positions[1], this._simProjectile.position];
    }
}
