PlayGameItem.ts 663 B

1234567891011121314151617181920212223242526
  1. import { _decorator, Component, Node, Event } from "cc";
  2. import BaseUI from "../../scripts/base/BaseUI";
  3. import { GameDetailLayer } from "../layer/GameDetailLayer";
  4. import { Tips } from "../../scripts/mgr/Tips";
  5. const { ccclass, property } = _decorator;
  6. @ccclass("PlayGameItem")
  7. export class PlayGameItem extends BaseUI {
  8. protected onLoad(): void {
  9. super.onLoad();
  10. }
  11. private gameId: number = 0;
  12. init(itemID: number) {
  13. this.gameId = itemID;
  14. }
  15. protected simpleOnBtnClick(name: string): void {
  16. if (name === "btn_play") {
  17. Tips.show("Coming soon");
  18. // GameDetailLayer.show(this.gameId, this.FindNode("icon_game"));
  19. }
  20. }
  21. }