Start.ts 634 B

12345678910111213141516171819202122232425262728
  1. import { _decorator } from 'cc';
  2. import { UIBase } from '../GameFrameWork/UIBase';
  3. import { UIMgr } from '../../Frames/UIManager';
  4. const { ccclass, property } = _decorator;
  5. @ccclass('Start')
  6. export class Start extends UIBase {
  7. protected onStart() {
  8. this.onBtnClick("_btnStart", this._btnStart, this);
  9. this.onBtnClick("_btnMusic", this._btnMusic, this);
  10. this.onBtnClick("_clearData", this._btnClearDt, this)
  11. }
  12. private _btnStart() {
  13. UIMgr.closeUI("Start");
  14. }
  15. private _btnMusic() {
  16. }
  17. //清除本地数据
  18. private _btnClearDt(){
  19. localStorage.clear();
  20. }
  21. }