Exemplo n.º 1
0
        public void Teardown()
        {
            PromiseChain <System.Action> teardownChain = new PromiseChain <System.Action>();
            int count = _managers.Count;

            for (int i = count - 1; i >= 0; --i)
            {
                teardownChain.Then(_managers[i].Teardown, OnTeardown);
            }

            teardownChain.Exec();
        }
Exemplo n.º 2
0
        public async Task Setup(BootStrap bootstrap, System.Action <IManager> onSetup, System.Action <IManager> onSetupFail)
        {
            PromiseChain promise = new PromiseChain();

            if (_layerRoot == null)
            {
                promise.Then(LoadUICamera);
            }
            if (_layerPrefab == null)
            {
                promise.Then(LoadDeviceFrame);
            }
            await promise.Exec();

            SetupInternal();

            onSetup(this);
        }