void SetGameEvents() { //later we would have some other mechanism which creates some events //or reads others from some config file, but for now we just simulate //the matchdays var aSunday = DayOfWeek.Sunday; var sundays = GameDaysCurrentMonth.Where(d => d.day.DayOfWeek == aSunday); foreach (AFM_GameDay day in sundays) { day.GameEvent = new AFM_GameEvent("Matchday"); } }
public void NextDay() { //remove the flag from the current day currentDay.IsCurrent = false; int nextDayIndex = GameDaysCurrentMonth.IndexOf(currentDay); if (nextDayIndex + 1 >= GameDaysCurrentMonth.Count) { //end of month reached DateController.instance.SetNextMonth(); return; } CurrentDay = GameDaysCurrentMonth[nextDayIndex + 1]; currentDay.IsCurrent = true; PrepareNextDay(); }