WorldClock/Scripts/ClockLibrary.cs
/// <summary>
/// Set the active clock. Registers the clock if it is not already registered
/// </summary>
/// <param name="clock">A reference to the <see cref="WorldClock"/> to set active</param>
Set the active clock. Registers the clock if it is not already registered
Set the active clock . Registers the clock if it is not already registered
public void SetActiveClock(WorldClock clock)
    {
        if (!allClocks.ContainsKey(clock.ClockID))
        {
            allClocks.Add(clock.ClockID, clock);
        }
        if (ActiveClock != null)
            ActiveClock.Tick.RemoveListener(ActiveClockTicked);
        ActiveClock = clock;
        ActiveClock.Tick.AddListener(ActiveClockTicked);
    }
public void SetActiveClock ( WorldClock clock ) { if ( ! allClocks . ContainsKey ( clock . ClockID ) ) { allClocks . Add ( clock . ClockID , clock ) ; } if ( ActiveClock != null ) ActiveClock . Tick . RemoveListener ( ActiveClockTicked ) ; ActiveClock = clock ; ActiveClock . Tick . AddListener ( ActiveClockTicked ) ; }
Set the active clock.
Set the active clock .
clock
WorldClock
A reference to the  to set active
A reference to the to set active