mirror of
https://github.com/MartinKral/Slash-The-Hordes
synced 2025-10-09 16:46:00 +00:00
Menu button
This commit is contained in:
@@ -1,11 +1,14 @@
|
||||
import { _decorator, Component, Node } from "cc";
|
||||
import { _decorator, Component, Node, Button } from "cc";
|
||||
import { UIButton } from "../Services/UI/Button/UIButton";
|
||||
|
||||
import { GameRunner } from "./GameRunner";
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass("Menu")
|
||||
export class Menu extends Component {
|
||||
@property(UIButton) private playBtn: UIButton;
|
||||
|
||||
public async start(): Promise<void> {
|
||||
GameRunner.Instance.playGame();
|
||||
this.playBtn.InteractedEvent.on(() => GameRunner.Instance.playGame(), this);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user