protected virtual void CalendarMidnight(GameClockEventObject args)
        {
            EventHandler <GameClockEventObject> delegateHandler = CalendarMidnightEvent;

            if (delegateHandler != null)
            {
                delegateHandler(this, args);
            }
        }
        protected virtual void CalendarTimeChanged(GameClockEventObject args)
        {
            EventHandler <GameClockEventObject> delegateHandler = CalendarTimeChangedEvent;

            if (delegateHandler != null)
            {
                delegateHandler(this, args);
            }
        }
        /// <summary>
        ///  Midnight fires when clock fire event MidnightEvent.
        /// </summary>
        private void Midnight(object source, GameClockEventObject clockObject)
        {
            CalendarMidnight(clockObject);

            if (Endless)
            {
                DaysFromStart++;
                FillDaylyEventsList(_today.AddDays(1));
            }
        }
 /// <summary>
 ///  MinuteEnd fires when clock event MinuteEndEvent is started. Method add new minute to current calendar and start checking events.
 /// </summary>
 private void TimeChanged(object source, GameClockEventObject clockObject)
 {
     _today = _calendar.AddSeconds(_today, 1);
     CalendarTimeChanged(clockObject);
     CheckEvent();
 }
Пример #5
0
 private void Midnight(object source, GameClockEventObject clockObject)
 {
     MidnightNotification.text = "MIDNIGHT";
     StartCoroutine(ClearTextField(MidnightNotification, 1f));
 }
Пример #6
0
 private void TimeChanged(object source, GameClockEventObject clockObject)
 {
     PrintTime();
 }
Пример #7
0
 private void DayOver(object source, GameClockEventObject clockObject)
 {
     print("Day is over, current time is: " + clockObject.Hour + ":" + clockObject.Minute);
     StartButton.onClick.AddListener(StartDay);
 }