22 lines
500 B
TypeScript
22 lines
500 B
TypeScript
import { makeAutoObservable } from "mobx";
|
|
import { WorldState } from "./world";
|
|
import { WorldEditorState } from "./worldEditor";
|
|
|
|
export class RootState {
|
|
public readonly world = new WorldState();
|
|
public readonly worldEditor: WorldEditorState;
|
|
|
|
constructor() {
|
|
this.worldEditor = new WorldEditorState(this.world);
|
|
|
|
makeAutoObservable(
|
|
this,
|
|
{
|
|
world: false,
|
|
},
|
|
);
|
|
}
|
|
}
|
|
|
|
export const state = new RootState();
|