Closed stolsky closed 2 years ago
game_states.js
import StateStack from "";
const GameStates = new StateStack();
export default GameStates;
setup_state.js
let ready = false;
// ...
const enter = () => {
// load resources
};
const update = () => {
if (ready) {
GameStates.pop();
GameStates.push(...);
}
};
export {
update,
render,
enter,
exit
}
index.js