12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- import { _decorator, Button, Component, Node } from 'cc';
- import { Layout_Hall } from './Layout_Hall';
- import { UI_Rank } from '../UI_Rank/UI_Rank';
- import { UI_Settings } from '../UI_Settings/UI_Settings';
- import { UI_Sign } from '../UI_Sign/UI_Sign';
- import { UI_Invite } from '../UI_Invite/UI_Invite';
- import { GameUILayers, gui } from '../../../core/ui/ui';
- import ui_base from '../../../core/ui/ui_base';
- import { ResUtil } from '../../../core/util/ResUtil';
- import { ModuleDef } from '../../../Scripts/ModuleDef';
- import { SceneDef } from '../../../Scripts/SceneDef';
- const { ccclass, property } = _decorator;
- @ccclass('UI_Hall')
- export class UI_Hall extends ui_base {
- constructor() {
- super(ModuleDef.GAME, 'ui/UI_Hall/Hall', GameUILayers.GAME, Layout_Hall);
- }
- protected async onCreated() {
- const layout = this.getLayout<Layout_Hall>();
- this.onButtonEvent(layout.Start_Btn, () => {
- ResUtil.loadScene(SceneDef.GAME, ModuleDef.GAME, true);
- gui.close(UI_Hall);
- });
- this.onButtonEvent(layout.Settings_Btn, () => {
- gui.show(UI_Settings);
- });
- this.onButtonEvent(layout.Rank_Btn, () => {
- gui.show(UI_Rank);
- });
- this.onButtonEvent(layout.Sign_Btn, () => {
- gui.show(UI_Sign);
- });
- this.onButtonEvent(layout.Invite_Btn, () => {
- gui.show(UI_Invite);
- })
- }
- update(deltaTime: number) {
- }
- }
|