public void RemoveAllAlarmsForModule(FailureModule fm) { print ("[DangIt] [AlarmManager] Removing alarms..."); if (this.loops.Keys.Contains (fm)) { fm.AlarmsDoneCallback (); loops.Remove (fm); } }
public void RemoveAllAlarmsForModule(FailureModule fm) { print("[DangIt] [AlarmManager] Removing alarms..."); if (this.loops.Keys.Contains(fm)) { fm.AlarmsDoneCallback(); loops.Remove(fm); } }
public void RemoveAllAlarmsForModule(FailureModule fm) { audioSource.audio.volume = 0; Logger.Info("[DangIt] [AlarmManager] Removing alarms..."); if (this.loops.Keys.Contains(fm)) { fm.AlarmsDoneCallback(); loops.Remove(fm); } }
public void AddAlarm(FailureModule fm, int number) { this.audio.volume = DangIt.Instance.CurrentSettings.GetMappedVolume(); //This seems like an OK place for this, because if I put it in the constructor... // ...you would have to reboot to change it, but I don't want to add lag by adding it to each frame in Update() if (number != 0) { print ("[DangIt] [AlarmManager] Adding '" + number.ToString () + "' alarms from '" + fm.ToString () + "'"); loops.Add (fm, number); } else { print ("[DangIt] [AlarmManager] No alarms added: Would have added 0 alarms"); } }
public bool HasAlarmsForModule(FailureModule fm) { if (this.loops.Keys.Contains(fm)) { int i; loops.TryGetValue(fm, out i); if (i != 0) { return(true); } } return(false); }
public bool HasAlarmsForModule(FailureModule fm) { if (this.loops.Keys.Contains (fm)) { int i; loops.TryGetValue (fm, out i); if (i != 0) { return true; } } return false; }
public void AddAlarm(FailureModule fm, int number) { audioSource.audio.volume = DangIt.Instance.CurrentSettings.GetMappedVolume(); //This seems like an OK place for this, because if I put it in the constructor... // ...you would have to reboot to change it, but I don't want to add lag by adding it to each frame in Update() if (number != 0) { Logger.Info("[DangIt] [AlarmManager] Adding '" + number.ToString() + "' alarms from '" + fm.ToString() + "'"); loops.Add(fm, number); } else { Logger.Info("[DangIt] [AlarmManager] No alarms added: Would have added 0 alarms"); } }