2022-12-14 07:46:34 +00:00
|
|
|
import { _decorator, Component, Node, Button } from "cc";
|
|
|
|
import { UIButton } from "../Services/UI/Button/UIButton";
|
2022-12-12 08:15:27 +00:00
|
|
|
|
2022-12-07 09:47:46 +00:00
|
|
|
import { GameRunner } from "./GameRunner";
|
|
|
|
const { ccclass, property } = _decorator;
|
|
|
|
|
|
|
|
@ccclass("Menu")
|
|
|
|
export class Menu extends Component {
|
2022-12-14 07:46:34 +00:00
|
|
|
@property(UIButton) private playBtn: UIButton;
|
|
|
|
|
2022-12-12 08:15:27 +00:00
|
|
|
public async start(): Promise<void> {
|
2022-12-14 07:46:34 +00:00
|
|
|
this.playBtn.InteractedEvent.on(() => GameRunner.Instance.playGame(), this);
|
2022-12-07 09:47:46 +00:00
|
|
|
}
|
|
|
|
}
|