Upgrader, LevelUpSkill

This commit is contained in:
Martin
2022-11-23 09:01:01 +01:00
parent 94605e673e
commit b1f8f66499
38 changed files with 5158 additions and 692 deletions

View File

@@ -1,14 +1,21 @@
import { Component } from "cc";
import { Animation, Component, _decorator } from "cc";
import { delay } from "../Utils/AsyncUtils";
const { property } = _decorator;
export abstract class ModalWindow<TParam, TResult> extends Component {
@property(Animation) private animation: Animation;
private result: TResult;
private isDismissed = false;
public async runAsync(params?: TParam): Promise<TResult> {
this.setup(params);
this.animation?.play("open");
while (!this.isDismissed) await delay(100);
this.animation?.play("close");
await delay(500);
return this.result;
}