WorldClock/Scripts/WorldClock.cs
/// <summary>
/// Sets an alarm that will fire AlarmTriggered Event
/// </summary>
/// <param name="alarm">The time for the alarm</param>
Sets an alarm that will fire AlarmTriggered Event
Sets an alarm that will fire AlarmTriggered Event
public virtual void SetAlarm(TimeData alarm)
    {
        if (alarm == null)
        {
            Debug.LogWarning("[WORLDCLOCK] Cannot add a null alarm.");
            return;
        }
        if (alarms.Contains(alarm))
        {
            Debug.LogWarning("[WORLDCLOCK] Alarm already set. Not setting a second one.");
            return;
        }
        if (!GlobalTimeValues.IsMatch(alarm.MyGlobalTime))
        {
            Debug.LogWarning("[WORLDCLOCK] Alarm cannot be set. Global times do not match.");
            return;
        }
        alarms.Add(alarm);
    }
public virtual void SetAlarm ( TimeData alarm ) { if ( alarm == null ) { Debug . LogWarning ( " " ) ; return ; } if ( alarms . Contains ( alarm ) ) { Debug . LogWarning ( " " ) ; return ; } if ( ! GlobalTimeValues . IsMatch ( alarm . MyGlobalTime ) ) { Debug . LogWarning ( " " ) ; return ; } alarms . Add ( alarm ) ; }
Sets an alarm that will fire AlarmTriggered Event
Sets an alarm that will fire AlarmTriggered Event
alarm
TimeData
The time for the alarm
The time for the alarm