public async Task InitManagers() { _setupStatus = SetupStatus.Started; await _setupChain.Exec(); if (_setupStatus != SetupStatus.Failed) { _setupStatus = SetupStatus.Complete; } }
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(); }
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); }