UI换了很多,spine主视觉停用
This commit is contained in:
@@ -98,6 +98,23 @@ public class roomDetails : MonoBehaviour
|
||||
{
|
||||
_service = service;
|
||||
|
||||
UIBackStack.RegisterOrBump(
|
||||
this,
|
||||
() => this != null && gameObject != null && gameObject.activeInHierarchy,
|
||||
() =>
|
||||
{
|
||||
if (_spawnedRoomRankingInstance != null)
|
||||
{
|
||||
UIBackStack.Unregister(_spawnedRoomRankingInstance);
|
||||
Destroy(_spawnedRoomRankingInstance);
|
||||
_spawnedRoomRankingInstance = null;
|
||||
return true;
|
||||
}
|
||||
|
||||
Destroy(gameObject);
|
||||
return true;
|
||||
});
|
||||
|
||||
if (_service == null)
|
||||
{
|
||||
Debug.LogWarning("[roomDetails] ArenaRoomService is missing.");
|
||||
@@ -172,6 +189,8 @@ public class roomDetails : MonoBehaviour
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
UIBackStack.Unregister(this);
|
||||
|
||||
if (_service != null)
|
||||
{
|
||||
_service.OnRoomSnapshotChanged -= HandleRoomSnapshotChanged;
|
||||
@@ -244,6 +263,7 @@ public class roomDetails : MonoBehaviour
|
||||
|
||||
if (_spawnedRoomRankingInstance != null)
|
||||
{
|
||||
UIBackStack.Unregister(_spawnedRoomRankingInstance);
|
||||
Destroy(_spawnedRoomRankingInstance);
|
||||
_spawnedRoomRankingInstance = null;
|
||||
}
|
||||
@@ -1192,6 +1212,20 @@ public class roomDetails : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
UIBackStack.RegisterOrBump(
|
||||
_spawnedRoomRankingInstance,
|
||||
() => _spawnedRoomRankingInstance != null && _spawnedRoomRankingInstance.activeInHierarchy,
|
||||
() =>
|
||||
{
|
||||
if (_spawnedRoomRankingInstance != null)
|
||||
{
|
||||
Destroy(_spawnedRoomRankingInstance);
|
||||
_spawnedRoomRankingInstance = null;
|
||||
}
|
||||
|
||||
return true;
|
||||
});
|
||||
|
||||
rankingListPrefab ranking = _spawnedRoomRankingInstance.GetComponent<rankingListPrefab>();
|
||||
if (ranking == null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user