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