123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- /*
- * @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) {}
- }
|