public void StopAll() { for (int i = 0; i < _loops.Count; ++i) { ILoopable lp = (ILoopable)_loops[i]; lp.OnStop(); _enabs[i] = false; } }
public void Stop(ILoopable toStart) { for (int i = 0; i < _loops.Count; ++i) { ILoopable lp = (ILoopable)_loops[i]; bool en = (bool)_enabs[i]; if (lp == toStart) { if (en == true) { lp.OnStop(); _enabs[i] = false; } return; } } Debug.Print("CTR: Could not find object in scheduler"); }