IEnumerator DoBoundRoutine(uint id, IEnumerator routine) { yield return(CoroutineUtilities.RunWhile(routine, () => idList.Contains(id))); idList.Remove(id); BoundRoutines.Remove(id); }
public IEnumerator RunMoveUntil(IBossMove move, Func <bool> predicate) { CurrentMove = move; yield return(CoroutineUtilities.RunWhile(move.DoMove(), () => !predicate())); PreviousMove = move; if (CurrentMove == move) { CurrentMove = null; } else { move.OnCancel(); } }