Modal windows

This commit is contained in:
Martin
2022-12-21 14:08:49 +01:00
parent b4abb4df21
commit f3eb520300
25 changed files with 5287 additions and 263 deletions

View File

@@ -10,6 +10,7 @@ const { ccclass, property } = _decorator;
export class Menu extends Component {
@property(UIButton) private playBtn: UIButton;
@property(UIButton) private upgradeBtn: UIButton;
@property(UIButton) private audioSettingsBtn: UIButton;
@property(ModalWindowManager) private modalWindowManager: ModalWindowManager;
private menuModalLauncher: MenuModalLauncher;
@@ -17,6 +18,7 @@ export class Menu extends Component {
public async start(): Promise<void> {
this.playBtn.InteractedEvent.on(this.startGame, this);
this.upgradeBtn.InteractedEvent.on(this.openUpgradesWindow, this);
this.audioSettingsBtn.InteractedEvent.on(this.openAudioSettingsWindow, this);
this.menuModalLauncher = new MenuModalLauncher(this.modalWindowManager);
}
@@ -28,4 +30,8 @@ export class Menu extends Component {
private openUpgradesWindow(): void {
this.menuModalLauncher.openUpgradesWindow();
}
private openAudioSettingsWindow(): void {
this.menuModalLauncher.openAudioSettingsWindow();
}
}