basic state switching from loading to running to editing

This commit is contained in:
2025-02-08 01:16:09 -07:00
parent 623a324625
commit 791ba42ceb
21 changed files with 769 additions and 187 deletions

View File

@@ -0,0 +1,25 @@
import { State } from "../machine.ts";
import { States } from "./index.ts";
export class EditTrainState extends State<States> {
override name: States = States.EDIT_TRAIN;
override validTransitions: Set<States> = new Set([
States.RUNNING,
States.PAUSED,
]);
override update(dt: number): void {
throw new Error("Method not implemented.");
}
override start(): void {
throw new Error("Method not implemented.");
// TODO
// Cache trains
// Stash train in context
// Draw track
// Draw train (filtered by train ID)
}
override stop(): void {
throw new Error("Method not implemented.");
}
}