
import { Vector, VectorInteger } from "./Vector.js";

interface Component {
	pos: VectorInteger;
}

interface GraphicComponent extends Component {
	ctx: CanvasRenderingContext2D;
	color: string;
	update: () => void;
	clear: (pos?: VectorInteger) => void;
}

interface Moving {
	dir: Vector;
	speed: number; // pixel per second
	move(delta: number): void;
}

export {Component, GraphicComponent, Moving}
