mirror of
https://github.com/MartinKral/Slash-The-Hordes
synced 2026-02-14 12:22:42 +00:00
Menu modal WIP, new settigns
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import { instantiate, Prefab, _decorator, Node } from "cc";
|
||||
import { ModalWindow } from "../../../Services/ModalWindowSystem/ModalWindow";
|
||||
import { UpgradeUI } from "./UpgradeUI";
|
||||
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass("UpgradesModalWindow")
|
||||
export class UpgradesModalWindow extends ModalWindow<Empty, Empty> {
|
||||
@property(Prefab) upgradeButtonPrefab: Prefab;
|
||||
@property(Node) upgradeButtonParent: Node;
|
||||
|
||||
public setup(params: Empty): void {
|
||||
for (let index = 0; index < 6; index++) {
|
||||
const upgradeButton: Node = instantiate(this.upgradeButtonPrefab);
|
||||
upgradeButton.getComponent(UpgradeUI).init("Title", "Description", 5);
|
||||
upgradeButton.setParent(this.upgradeButtonParent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export class Empty {}
|
||||
Reference in New Issue
Block a user