Pauser, game modal launcher

This commit is contained in:
Martin
2022-11-25 12:00:09 +01:00
parent 43953f18a9
commit 4ca44647d6
18 changed files with 163 additions and 58 deletions

View File

@@ -1,14 +1,15 @@
import { Component, Label, NodeEventType, _decorator } from "cc";
import { ISignal } from "../../../Services/EventSystem/ISignal";
import { Signal } from "../../../Services/EventSystem/Signal";
import { UpgradeType } from "../../Upgrades/UpgradeType";
const { ccclass, property } = _decorator;
@ccclass("LevelUpSkill")
export class LevelUpSkill extends Component {
@property(Label) private skillTitle: Label;
private chooseSkillEvent: Signal<LevelUpSkill> = new Signal<LevelUpSkill>();
public init(skillTitle: string): void {
this.skillTitle.string = skillTitle;
public init(skillType: UpgradeType): void {
this.skillTitle.string = `Skill ${skillType}`;
this.node.on(NodeEventType.MOUSE_DOWN, this.chooseSkill, this);
}