好多新内容

This commit is contained in:
FloatGaming
2026-07-22 05:35:53 +08:00
parent b5d1cdcbc5
commit 15649d02f8
128 changed files with 5956 additions and 673 deletions
@@ -197,6 +197,11 @@ public class equipSmelt : MonoBehaviour
public void RefreshPlayerSkillAdjustedUi()
{
if (!IsRuntimeSceneInstance())
{
return;
}
RefreshAllUi();
}
@@ -1027,10 +1032,16 @@ public class equipSmelt : MonoBehaviour
private void ClearSmeltPoolItems()
{
for (int i = smeltPoolContent != null ? smeltPoolContent.childCount - 1 : -1; i >= 0; i--)
if (!IsRuntimeSceneInstance())
{
Transform child = smeltPoolContent.GetChild(i);
if (child == null)
spawnedPoolItems.Clear();
return;
}
for (int i = spawnedPoolItems.Count - 1; i >= 0; i--)
{
GameObject item = spawnedPoolItems[i];
if (item == null)
{
continue;
}
@@ -1038,18 +1049,28 @@ public class equipSmelt : MonoBehaviour
#if UNITY_EDITOR
if (!Application.isPlaying)
{
DestroyImmediate(child.gameObject);
DestroyImmediate(item);
}
else
#endif
{
Destroy(child.gameObject);
Destroy(item);
}
}
spawnedPoolItems.Clear();
}
private bool IsRuntimeSceneInstance()
{
if (this == null || gameObject == null)
{
return false;
}
return gameObject.scene.IsValid();
}
private void RegisterInstance()
{
if (!Instances.Contains(this))