wIp
This commit is contained in:
+3
-3
@@ -1,13 +1,13 @@
|
||||
export type Process = (id: string, delta: number) => void;
|
||||
|
||||
export const entityProcessMap = new Map<string, Process>();
|
||||
export const entityBlueprintsMap = new Map<string, Map<string, unknown>>();
|
||||
export const entityBlueprintMap = new Map<string, Map<string, unknown>>();
|
||||
|
||||
export function defineEntity<T extends { [key: string]: unknown }>(
|
||||
name: string,
|
||||
blueprints: T,
|
||||
blueprint: T,
|
||||
): (fn: Process) => void {
|
||||
entityBlueprintsMap.set(name, new Map(Object.entries(blueprints)));
|
||||
entityBlueprintMap.set(name, new Map(Object.entries(blueprint)));
|
||||
|
||||
return (fn) => {
|
||||
entityProcessMap.set(name, fn);
|
||||
|
||||
Reference in New Issue
Block a user