Beispiel #1
0
 private void NotifyHourObservers()
 {
     if (totalSeconds % SecondsPerHour == 0)
     {
         HourPassed?.Invoke(totalSeconds / SecondsPerHour);
     }
 }
Beispiel #2
0
        /// <summary>
        /// Pass hour
        /// </summary>
        private void TickHour()
        {
            currentTime.CurrentHour++;

            HourPassed?.Invoke(this, new EventArgsWithPayload <IngameTime>(currentTime));

            if (currentTime.CurrentHour < INGAME_DAY_LENGTH_HOURS)
            {
                return;
            }

            currentTime.CurrentHour = 0;

            TickDay();
        }