Skip to content

Commit

Permalink
Change backdrops to public
Browse files Browse the repository at this point in the history
  • Loading branch information
Haruma-K committed Jan 15, 2024
1 parent 2373d2b commit b79cc2f
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public sealed class ModalContainer : MonoBehaviour
private readonly Dictionary<string, AssetLoadHandle<GameObject>> _assetLoadHandles
= new Dictionary<string, AssetLoadHandle<GameObject>>();

private readonly List<ModalBackdrop> _backdrops = new List<ModalBackdrop>();
public List<ModalBackdrop> Backdrops { get; } = new List<ModalBackdrop>();

private readonly List<IModalContainerCallbackReceiver> _callbackReceivers =
new List<IModalContainerCallbackReceiver>();
Expand Down Expand Up @@ -306,7 +306,7 @@ private IEnumerator PushRoutine(Type modalType, string resourceKey, bool playAni

var backdrop = Instantiate(_backdropPrefab);
backdrop.Setup((RectTransform)transform);
_backdrops.Add(backdrop);
Backdrops.Add(backdrop);

var instance = Instantiate(assetLoadHandle.Result);
if (!instance.TryGetComponent(modalType, out var c))
Expand Down Expand Up @@ -427,7 +427,7 @@ private IEnumerator PopRoutine(bool playAnimation, int popCount = 1)
var unusedModalId = _orderedModalIds[i];
unusedModalIds.Add(unusedModalId);
unusedModals.Add(_modals[unusedModalId]);
unusedBackdrops.Add(_backdrops[i]);
unusedBackdrops.Add(Backdrops[i]);
}

var enterModalIndex = _orderedModalIds.Count - popCount - 1;
Expand Down Expand Up @@ -497,7 +497,7 @@ private IEnumerator PopRoutine(bool playAnimation, int popCount = 1)

foreach (var unusedBackdrop in unusedBackdrops)
{
_backdrops.Remove(unusedBackdrop);
Backdrops.Remove(unusedBackdrop);
Destroy(unusedBackdrop.gameObject);
}

Expand Down

0 comments on commit b79cc2f

Please sign in to comment.