1234567891011121314151617181920212223242526 |
- import { _decorator } from "cc";
- import { GameUILayers, gui } from "../../../core/ui/ui";
- import ui_base from "../../../core/ui/ui_base";
- import { ModuleDef } from "../../../Scripts/ModuleDef";
- import { ani_ui } from "../UI_Main/UI_Main";
- import { Layout_GameRules } from "./Layout_GameRules";
- const { ccclass, property } = _decorator;
- @ccclass('UI_GameRules')
- export class UI_GameRules extends ui_base {
- constructor() {
- super(ModuleDef.GAME, 'ui/UI_GameRules/GameRules', GameUILayers.HUD, Layout_GameRules);
- }
-
- protected async onCreated() {
- const layout = this.getLayout<Layout_GameRules>();
- ani_ui(layout.Close_Btn.node.parent);
- this.onButtonEvent(layout.Close_Btn, async (button: any) => {
- //关闭设置界面
- gui.close(UI_GameRules);
- }, this);
- }
- }
|