HumanBreak/packages-user/client-modules/src/render/action.ts
2025-06-24 21:07:30 +08:00

17 lines
557 B
TypeScript

import { gameKey } from '@motajs/system-action';
import { MAIN_WIDTH, MAIN_HEIGHT } from './shared';
import { saveSave, mainUIController, openStatistics, saveLoad } from './ui';
export function createAction() {
gameKey
.realize('save', () => {
saveSave(mainUIController, [0, 0, MAIN_WIDTH, MAIN_HEIGHT]);
})
.realize('statistics', () => {
openStatistics(mainUIController);
})
.realize('load', () => {
saveLoad(mainUIController, [0, 0, MAIN_WIDTH, MAIN_HEIGHT]);
});
}