Beispiel #1
0
    /// <summary>
    /// Mutator for the current month, which also calls the OnMonthPass event
    /// </summary>
    private void SetCurrentMonth(int _currentMonth)
    {
        if (currentMonth != _currentMonth && _currentMonth > 0)
        {
            currentMonth = _currentMonth;

            OnMonthPass?.Invoke();
        }
    }
        private IEnumerator UpdateCalendar()
        {
            while (true)
            {
                yield return(new WaitForSeconds(timeVelocity));

                var auxDate = _actualDate;
                _actualDate = _actualDate.AddDays(1);
                _uiCalendarManager.UpdateCalendarInfo(TransformDate());

                if (auxDate.Month < _actualDate.Month)
                {
                    Debug.Log("UpdateCalendar Month check: " + auxDate.Month + " -> " + _actualDate.Month);
                    OnMonthPass?.Invoke();
                }
            }
        }