UI_Sign.ts 762 B

12345678910111213141516171819202122232425
  1. import { _decorator, Component, Node } from 'cc';
  2. import { GameUILayers, gui } from 'db://assets/core/ui/ui';
  3. import ui_base from 'db://assets/core/ui/ui_base';
  4. import { ModuleDef } from 'db://assets/Scripts/ModuleDef';
  5. import { Layout_Sign } from './Layout_Sign';
  6. import { ani_ui } from '../UI_Main/UI_Main';
  7. const { ccclass, property } = _decorator;
  8. @ccclass('UI_Sign')
  9. export class UI_Sign extends ui_base {
  10. constructor() {
  11. super(ModuleDef.GAME, 'ui/UI_Sign/Sign', GameUILayers.HUD, Layout_Sign);
  12. }
  13. protected async onCreated() {
  14. const layout = this.getLayout<Layout_Sign>();
  15. ani_ui(layout.Return.node.parent.parent);
  16. this.onButtonEvent(layout.Return, () => {
  17. gui.close(UI_Sign);
  18. })
  19. }
  20. }