示例#1
0
 private void NotifyMinuteObservers()
 {
     if (totalSeconds % SecondsPerMinute == 0)
     {
         MinutePassed?.Invoke(totalSeconds / SecondsPerMinute);
     }
 }
示例#2
0
        /// <summary>
        /// Pass minute
        /// </summary>
        private void TickMinute()
        {
            currentTime.CurrentMinute++;

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

            if (currentTime.CurrentMinute < INGAME_HOUR_LENGTH_MINUTES)
            {
                return;
            }

            currentTime.CurrentMinute = 0;

            TickHour();
        }