Example.ts 862 B

12345678910111213141516171819202122232425262728293031323334
  1. /** @format */
  2. import {UI} from '../enums/UI'
  3. import {BaseUI} from './BaseUI'
  4. import {Data, Mgr} from '../GameControl'
  5. import {ccUtils} from '../utils/ccUtils'
  6. import {observer, render, node, label, editBox, list} from '../mobx/observer'
  7. import {msgCmd} from '../proto/msg_cmd'
  8. const {ccclass, property} = cc._decorator
  9. @ccclass
  10. @observer
  11. export class Example extends BaseUI {
  12. onShow(args, fromUI: number) {
  13. //Mgr.net.add(msgCmd.xxx, this, this.onXXXRsp)
  14. }
  15. onHide(): any {
  16. Mgr.event.removeAll(this)
  17. }
  18. //UI或者其他函数=======================================
  19. //网络事件=======================================
  20. // onXXXRsp() {}
  21. //触发事件=======================================
  22. // @render
  23. // showRender() {}
  24. // 点击事件=======================================
  25. // onClick() {}
  26. }