12345678910111213141516171819202122232425 |
- import { _decorator, Component, Node } from 'cc';
- import ui_base from 'db://assets/core/ui/ui_base';
- import { Layout_GameRules } from './Layout_GameRules';
- import { GameUILayers, gui } from 'db://assets/core/ui/ui';
- import { ModuleDef } from 'db://assets/Scripts/ModuleDef';
- import { ani_ui } from '../UI_Main/UI_Main';
- 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);
- }
- }
|