UI换了很多,spine主视觉停用
This commit is contained in:
@@ -437,7 +437,7 @@ public class settlementController : MonoBehaviour
|
||||
{
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
GameObject go = GameObject.Find($"ally_0{i + 1}");
|
||||
GameObject go = SceneObjectLookupCache.Find($"ally_0{i + 1}");
|
||||
if (go != null)
|
||||
{
|
||||
AllyCombatant ac = go.GetComponent<AllyCombatant>();
|
||||
@@ -550,7 +550,7 @@ public class settlementController : MonoBehaviour
|
||||
getThisSong_info();
|
||||
|
||||
// --- Statistics: Record total play time at settlement ---
|
||||
GameManager runtimeGameManager = gm != null ? gm : FindAnyObjectByType<GameManager>();
|
||||
GameManager runtimeGameManager = gm != null ? gm : SceneObjectLookupCache.FindAny<GameManager>();
|
||||
float sessionDurationForTasks = runtimeGameManager != null ? runtimeGameManager.GetPendingSessionDurationSeconds() : 0f;
|
||||
if (runtimeGameManager != null) runtimeGameManager.RecordTotalPlayTime();
|
||||
|
||||
@@ -733,7 +733,7 @@ public class settlementController : MonoBehaviour
|
||||
if (settlementTeamLoader == null)
|
||||
{
|
||||
// try to auto-locate loader in scene if not assigned in inspector
|
||||
settlementTeamLoader = FindAnyObjectByType<loadSettlementTeamPrefab>();
|
||||
settlementTeamLoader = SceneObjectLookupCache.FindAny<loadSettlementTeamPrefab>();
|
||||
}
|
||||
|
||||
if (settlementTeamLoader != null)
|
||||
@@ -741,7 +741,7 @@ public class settlementController : MonoBehaviour
|
||||
// ensure loader has key references
|
||||
if (settlementTeamLoader.sm == null) settlementTeamLoader.sm = sm ?? ScoreManager.Instance;
|
||||
if (settlementTeamLoader.tuic == null) settlementTeamLoader.tuic = teamUIController.Instance;
|
||||
if (settlementTeamLoader.gm == null) settlementTeamLoader.gm = gm ?? FindAnyObjectByType<GameManager>();
|
||||
if (settlementTeamLoader.gm == null) settlementTeamLoader.gm = gm ?? SceneObjectLookupCache.FindAny<GameManager>();
|
||||
try { settlementTeamLoader.PopulateSettlementCards(); }
|
||||
catch (System.Exception ex) { Debug.LogWarning("Failed to PopulateSettlementCards: " + ex); }
|
||||
}
|
||||
@@ -996,7 +996,7 @@ public class settlementController : MonoBehaviour
|
||||
|
||||
private bool IsEarlySettlement(int noteCountRaw)
|
||||
{
|
||||
NoteSpawner spawner = FindAnyObjectByType<NoteSpawner>();
|
||||
NoteSpawner spawner = SceneObjectLookupCache.FindAny<NoteSpawner>();
|
||||
if (spawner != null && spawner.IsImmediateSettlementTriggered)
|
||||
{
|
||||
return true;
|
||||
@@ -2078,7 +2078,7 @@ public class settlementController : MonoBehaviour
|
||||
// fallback: read AllyCombatant.currentScore from scene
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
var go = GameObject.Find($"ally_0{ i+1 }");
|
||||
var go = SceneObjectLookupCache.Find($"ally_0{ i+1 }");
|
||||
if (go != null)
|
||||
{
|
||||
var ac = go.GetComponent<AllyCombatant>();
|
||||
|
||||
Reference in New Issue
Block a user