예제 #1
0
 private void NotifyHourObservers()
 {
     if (totalSeconds % SecondsPerHour == 0)
     {
         HourPassed?.Invoke(totalSeconds / SecondsPerHour);
     }
 }
예제 #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();
        }