Commit 9df7a1ee authored by haiyoucuv's avatar haiyoucuv

倒计时

parent e726f685
......@@ -16,10 +16,7 @@ import { Stats } from 'pixi-stats';
import { System } from 'detect-collisions';
import gameStore from "@/store/gameStore.ts";
import { prefixInteger, second2Date } from "@/utils/utils.ts";
import { ModalCtrl } from "@/core/ctrls/ModalCtrl.tsx";
import SucPanel from "@/panels/SucPanel/SucPanel.tsx";
import FailPanel from "@/panels/FailPanel/FailPanel.tsx";
import { prefixInteger } from "@/utils/utils.ts";
export const collisionSys: System = new System();
const DEBUG = true ;
......@@ -64,7 +61,6 @@ class GamePage extends React.Component {
this.startCd();
// ModalCtrl.showModal(SucPanel);
}
startCd = () => {
......
......@@ -6,6 +6,9 @@ import {AESEncrypt} from "@/utils/Crypto.ts";
import { PageCtrl } from "@/core/ctrls/PageCtrl.tsx";
import HomePage from "@/pages/HomePage/HomePage.tsx";
import { GameConfig } from "@/pages/GamePage/config/Config.ts";
import FailPanel from "@/panels/FailPanel/FailPanel.tsx";
import SucPanel from "@/panels/SucPanel/SucPanel.tsx";
import { ModalCtrl } from "@/core/ctrls/ModalCtrl.tsx";
class GameStore {
......@@ -94,8 +97,10 @@ class GameStore {
return;
}
if (data) {
if (score > data.reachTargetScore) {
ModalCtrl.showModal(SucPanel);
} else {
ModalCtrl.showModal(FailPanel);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment