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