début de la mise en place du jeu (partie client uniquement).

This commit is contained in:
batche
2022-12-08 19:08:07 +01:00
parent a3aaedb1fd
commit 8d640ae4ab
81 changed files with 2876 additions and 2 deletions

View File

@@ -0,0 +1,21 @@
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}