public void PauseSimulation() { if (!IsRunning) { PauseToggle.SetIsOnWithoutNotify(false); } else { IsPausing = !IsPausing; } }
public void StopSimulation() { if (!IsRunning) { return; } IsRunning = IsPausing = false; PlayToggle.SetIsOnWithoutNotify(false); PauseToggle.SetIsOnWithoutNotify(false); StopToggle.SetIsOnWithoutNotify(false); TheBoard.Stop(); foreach (var kv in GOPhotons) { Destroy(kv.Value); } GOPhotons.Clear(); }