Ejemplo n.º 1
0
        protected void ChangeContext(
            SystemContext next,
            SystemContextContainer container         = null,
            System.Func <IEnumerator> onCurPreUnload = null,
            System.Func <IEnumerator> onCurUnload    = null,
            System.Func <IEnumerator> onCurUnloaded  = null,
            System.Func <IEnumerator> onNextPreLoad  = null,
            System.Func <IEnumerator> onNextLoad     = null,
            System.Func <IEnumerator> onNextLoaded   = null)
        {
            SystemContextChanger changer = new SystemContextChanger();

            changer.OnCurPreUnload = onCurPreUnload;
            changer.OnCurUnload    = onCurUnload;
            changer.OnCurUnloaded  = onCurUnloaded;
            changer.OnNextPreLoad  = onNextPreLoad;
            changer.OnNextLoad     = onNextLoad;
            changer.OnNextLoaded   = onNextLoaded;

            changer.Execute(this, next, container);
        }
Ejemplo n.º 2
0
 public void Execute(SystemContext self, SystemContext next, SystemContextContainer container)
 {
     AbsolutelyActiveCoroutine.Subscribe(DoExecute(self, next, container));
 }