BindGameLayer.ts 978 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. import { _decorator, Component, Node } from "cc";
  2. import BaseUI from "../../scripts/base/BaseUI";
  3. import { Hall } from "../hall/Hall";
  4. import {
  5. BindGameInputLayer,
  6. BindGameInputLayerListener,
  7. } from "./BindGameInputLayer";
  8. import { Tips } from "../../scripts/mgr/Tips";
  9. const { ccclass, property } = _decorator;
  10. @ccclass("BindGameLayer")
  11. export class BindGameLayer
  12. extends BaseUI
  13. implements BindGameInputLayerListener
  14. {
  15. static async show() {
  16. let layer = await Hall.ins.showLayer("prefab/layer/BindGameLayer");
  17. layer.getComponent(BindGameLayer).init();
  18. }
  19. protected onLoad(): void {
  20. super.onLoad();
  21. this.FindNode("BindGameItem").active = false;
  22. }
  23. private init() {}
  24. OnInput(input: string): void {
  25. Tips.show("綁定成功");
  26. this.setText("lbl_code_banana", input);
  27. }
  28. protected simpleOnBtnClick(name: string): void {
  29. switch (name) {
  30. case "btn_bind_game_pvz":
  31. Tips.show("Coming soon");
  32. break;
  33. }
  34. }
  35. }