From 1ab047b5fdd933c38ba0519ec2e83a44512ea8d7 Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期四, 26 三月 2026 17:46:11 +0800
Subject: [PATCH] webgl代码合并 1
---
Main/System/Battle/UIComp/BattleBuffCell.cs | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/Main/System/Battle/UIComp/BattleBuffCell.cs b/Main/System/Battle/UIComp/BattleBuffCell.cs
index 90e2946..2b1e5dd 100644
--- a/Main/System/Battle/UIComp/BattleBuffCell.cs
+++ b/Main/System/Battle/UIComp/BattleBuffCell.cs
@@ -66,15 +66,19 @@
if (cellContainer == null)
{
- cellContainer = await UIUtility.CreateWidget("BattleBuffCell", "Container_BuffCell");
+ var inst = await UIUtility.CreateWidget("BattleBuffCell", "Container_BuffCell");
if (this == null)
{
- if (null != cellContainer)
- {
- DestroyImmediate(cellContainer);
- }
+ if (null != inst) DestroyImmediate(inst);
return;
}
+
+ if (cellContainer != null)
+ {
+ DestroyImmediate(inst);
+ return;
+ }
+ cellContainer = inst;
if (cellContainer != null)
{
@@ -109,6 +113,7 @@
return;
}
await LoadPrefab(); //瀛樺湪琚嵏杞界殑鍙兘锛岄噸鏂板姞杞�
+ if (this == null) return;
var config = SkillConfig.Get((int)buffData.SkillID);
if (config == null)
{
--
Gitblit v1.8.0