GameOverView.ts 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * @Author: mojunshou 1637302775@qq.com
  3. * @Date: 2025-03-27 18:19:53
  4. * @LastEditors: mojunshou 1637302775@qq.com
  5. * @LastEditTime: 2025-04-10 15:08:55
  6. * @Description: 游戏结束界面
  7. */
  8. import { _decorator } from 'cc';
  9. import { oops } from 'db://oops-framework/core/Oops';
  10. import { GameComponent } from "db://oops-framework/module/common/GameComponent";
  11. import { UIID } from '../common/config/GameUIConfig';
  12. import { GameEvent } from '../common/config/GameEvent';
  13. import { smc } from '../common/SingletonModuleComp';
  14. import { ADHandler } from '../common/manager/ADHandler';
  15. import { AD_TYPE } from '../common/config/GameDefine';
  16. const { ccclass, property } = _decorator;
  17. /** 显示对象控制 */
  18. @ccclass('GameOverView')
  19. export class GameOverView extends GameComponent {
  20. protected start() {
  21. this.setButton();
  22. }
  23. private btn_restart() {
  24. oops.message.dispatchEvent(GameEvent.RestartGame);
  25. oops.gui.remove(UIID.GameOver);
  26. }
  27. private btn_resurrection() {
  28. //打开广告
  29. //我这调你登录,你登录后,返回给我,可以登录,我这边加载资源,userinfo-头像,UID nickname,关卡,还有配置,
  30. //复活
  31. smc.game.GameModel.viewType = "revive_reward";
  32. }
  33. }