Ejemplo n.º 1
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);
        }
Ejemplo n.º 2
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();
        }
Ejemplo n.º 3
0
 public BootStrap Then(IManager manager)
 {
     _setupChain.Then(manager.Setup, this, OnManagerSetup, OnManagerSetupFail);
     return(this);
 }