public int ExecuteOnce(IEnumerator routine)
    {
        var controller = new CoroutineController(this, routine);

        controller.Start();

        _onceDic.Add(controller.ID, controller);
        return(controller.ID);
    }
Exemple #2
0
 public static Coroutine StartCoroutineEx(this MonoBehaviour monoBehaviour, IEnumerator routine, out CoroutineController coroutineController)
 {
     if (routine == null)
     {
         throw new System.ArgumentNullException("routine is NULL");
     }
     coroutineController = new CoroutineController(routine);
     return(monoBehaviour.StartCoroutine(coroutineController.Start()));
 }
Exemple #3
0
        protected override void OnApplied()
        {
            HudEvents.In += HudEvents_In;
            IL.BossSequenceController.RestoreBindings += BossSequenceController_RestoreBindings;
            foreach (var detour in _detours)
            {
                detour.Apply();
            }

            CoroutineController.Start(OnAppliedCoroutine());
        }
        protected override void OnRestored()
        {
            HudEvents.In         -= HudEvents_In;
            On.PlayerData.SetInt -= PlayerData_SetInt;
            foreach (var detour in _detours)
            {
                detour.Undo();
            }

            CoroutineController.Start(OnToggledCoroutine());
        }
        protected override void OnApplied()
        {
            HudEvents.In         += HudEvents_In;
            On.PlayerData.SetInt += PlayerData_SetInt;
            foreach (var detour in _detours)
            {
                detour.Apply();
            }

            CoroutineController.Start(OnToggledCoroutine());
        }
        protected override void OnRestored()
        {
            HudEvents.In -= HudEvents_In;
            On.GGCheckBoundSoul.OnEnter -= GGCheckBoundSoul_OnEnter;
            IL.BossSequenceController.RestoreBindings -= BossSequenceController_RestoreBindings;
            foreach (var detour in _detours)
            {
                detour.Undo();
            }

            CoroutineController.Start(OnRestoredCoroutine());
        }
    public void ExecuteOnce(IEnumerator routine)
    {
        CoroutineController controller = new CoroutineController(this, routine);

        controller.Start();
    }
    public static Coroutine StartCoroutineEx(this MonoBehaviour monoBehaviour, IEnumerator routine, out CoroutineController coroutineController)
    {
        if (routine == null)
        {
            throw new System.ArgumentNullException("routine");
        }

        coroutineController = new CoroutineController(routine);
        return monoBehaviour.StartCoroutine(coroutineController.Start());
    }