Projectiles, angles

This commit is contained in:
Martin
2022-12-15 11:14:35 +01:00
parent d989ead748
commit 9c3299ebfe
15 changed files with 2779 additions and 1870 deletions

View File

@@ -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 {}
}