12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- import auto_pauseView from "../../../ui/uidata/Interface/auto_pauseView";
- import UIBase from "../../../framework/ui/UIBase";
- import UIHelp from "../../../framework/ui/UIHelp";
- import AccountModel from "../../../data/Account/AccountModel";
- import gameData from "../../../gameLogic/utrl/gameData";
- const { ccclass, menu, property } = cc._decorator;
- @ccclass
- @menu("UI/Interface/UIPauseView")
- export default class UIPauseView extends UIBase {
- ui: auto_pauseView = null;
- protected static prefabUrl = "Interface/pauseView";
- protected static className = "UIPauseView";
- onUILoad() {
- this.ui = this.node.addComponent(auto_pauseView);
- }
- onShow() {
- this.initView();
- }
- initView() {
- let diePeopleNum = gameData.peopleDieNum;
- this.ui.liveDay_lb.getComponent(cc.Label).string = gameData.curDay.toString();
- this.ui.livePeople_lb.getComponent(cc.Label).string = gameData.curPeopleNum.toString();
- this.ui.diePeople_lb.getComponent(cc.Label).string = diePeopleNum.toString();
- this.ui.dieZom_lb.getComponent(cc.Label).string = gameData.curKillZomNum.toString();
- }
- continue_btn() {
- cc.director.resume();
- this.onClose();
- }
- onStart() {
- }
- onClose() {
- UIHelp.CloseUI(UIPauseView);
- }
- }
|