|
@@ -8,6 +8,7 @@ import { PlayerInfo, PlayerInfoComponent } from "../Component/PlayerInfoComponen
|
|
|
import { TornadoComponent } from "../Component/TornadoComponent";
|
|
|
import { GameUtil } from "../GameUtil";
|
|
|
import { ExpPropComponent } from "../Component/ExpPropComponent";
|
|
|
+import { PkPropUI } from "../PkPropUI";
|
|
|
|
|
|
export class Effect2DUIMgr {
|
|
|
private static _instance: Effect2DUIMgr;
|
|
@@ -170,6 +171,22 @@ export class Effect2DUIMgr {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ //pk信息
|
|
|
+ async addPKInfo(player1: string, player2: string) {
|
|
|
+ const pkPrefab = await resLoader.loadAsync(
|
|
|
+ resLoader.gameBundleName,
|
|
|
+ "Prefabs/PkProp",
|
|
|
+ Prefab
|
|
|
+ );
|
|
|
+
|
|
|
+ if (pkPrefab) {
|
|
|
+ const pkNode = instantiate(pkPrefab);
|
|
|
+ const effectUI = StormSunderGlobalInstance.instance.effectUI;
|
|
|
+ pkNode.parent = effectUI;
|
|
|
+ pkNode.getComponent(PkPropUI).updateBattleInfo(player1, player2);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
// 清理血条
|
|
|
removeBlood(target: Node) {
|
|
|
const bloodNode = this.bloodMap.get(target);
|