void IFrontmostUiBank.RegisterCanvas <T>(T residentUiCanvas)
        {
            if (canvasBank == null)
            {
                Debug.LogError($"has not inited {this.GetType().Name}");
                return;
            }

            CanvasInStratum canvas = new CanvasInStratum(
                ConstStratum.Frontmost,
                residentUiCanvas.OrderInStratum,
                residentUiCanvas.CanvasOrderUpdater);

            canvasBank.AddCanvas(canvas);
        }
Example #2
0
        void IBackgroundUiBank.EnqueueCanvas <T>(T backgroundUiCanvas)
        {
            if (canvasBank == null)
            {
                Debug.LogError($"has not inited {this.GetType().Name}");
                return;
            }

            backgroundUiCanvasList.RemoveAll(c => c.IsDestroyed);
            backgroundUiCanvasList.Add(backgroundUiCanvas);

            CanvasInStratum canvasInStratum = new CanvasInStratum(
                ConstStratum.Background,
                // 呼び出し順に登録するのですべて同じOrderInStratumで登録する
                0,
                backgroundUiCanvas.CanvasOrderUpdater);

            canvasBank.AddCanvas(canvasInStratum);
        }
Example #3
0
        void ICoreUiBank.NotifyPrepared <T>(T coreUiCanvas)
        {
            if (!CheckInited())
            {
                return;
            }

            currentCoreUiCanvas = coreUiCanvas;

            CanvasInStratum canvasInStratum = new CanvasInStratum(
                ConstStratum.Core,
                // 呼び出し順に登録するのですべて同じOrderInStratumで登録する
                0,
                coreUiCanvas.CanvasOrderUpdater);

            canvasBank.AddCanvas(canvasInStratum);

            isPrepared = true;
            TryEntry();
        }
Example #4
0
        void IPopupUiBank.RegisterCanvas <T>(T popupUiCanvas)
        {
            if (canvasBank == null)
            {
                Debug.LogError($"has not inited {this.GetType().Name}");
                return;
            }

            uiCanvasList.RemoveAll(ui => ui == null);
            uiCanvasList.Add(popupUiCanvas);

            CanvasInStratum canvas = new CanvasInStratum(
                ConstStratum.Popup,
                // 呼び出し順に登録するのですべて同じOrderInStratumで登録する
                0,
                popupUiCanvas.CanvasOrderUpdater);
            IEnumerable <CameraMat> cameraMats = EnumerateCameraMats(uiCanvasList);

            canvasBank.AddCanvas(canvas, cameraMats);
        }