/* * @Author: your name * @Date: 2021-09-19 12:06:21 * @LastEditTime: 2021-09-20 23:09:12 * @LastEditors: Please set LastEditors * @Description: In User Settings Edit * @FilePath: \zombiefood\assets\script\test\testPanel.ts */ // Learn TypeScript: // - https://docs.cocos.com/creator/manual/en/scripting/typescript.html // Learn Attribute: // - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html // Learn life-cycle callbacks: // - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html import gameData from "../gameLogic/utrl/gameData"; import { EVENT_TYPE } from "../gameLogic/utrl/gameEnum"; import gameEventManager from "../gameLogic/utrl/gameEventManager"; import UIHelp from "../framework/ui/UIHelp"; import UIWelfareView from "../ui/uiview/Interface/UIWelfareView"; import UIShopView from "../ui/uiview/Interface/UIShopView"; import UIAirdropView from "../ui/uiview/Interface/UIAirdropView"; const { ccclass, property } = cc._decorator; @ccclass export default class NewClass extends cc.Component { start() { } changeBulletNum() { let bulletNum = +this.node.$bullet_editBox.getComponent(cc.EditBox).string; gameData.curBulletNum = bulletNum; } addHero(){ gameEventManager.emit(EVENT_TYPE.ADD_HERO); } addBOSS(){ gameEventManager.emit(EVENT_TYPE.ADD_BOSS); } clickUI(){ UIHelp.ShowUI(UIAirdropView); } // update (dt) {} }