public LTime(int day, int hour, int minute, LDayPhase phase = default(LDayPhase)) { this.Day = day; this.Phase = phase; this.Hour = hour; this.Minute = minute; }
public static string GetMeridiem(LDayPhase phase) { switch (phase) { case LDayPhase.Morning: return(AM); case LDayPhase.Afternoon: case LDayPhase.Evening: return(PM); default: return(AM); } }
void sendDayPhaseTransitionEvent(LDayPhase newPhase) { switch (newPhase) { case LDayPhase.Morning: EventController.Event(LEvent.TransitionToDay); break; case LDayPhase.Afternoon: EventController.Event(LEvent.TransitionToEvening); break; case LDayPhase.Evening: EventController.Event(LEvent.TransitionToNight); break; } }
public LTime(string interactionName) { this.Day = determineDay(interactionName); this.Phase = determineDayPhase(interactionName); }
public void SetDay(int day, LDayPhase dayPhase, int hour, int minute = 0) { CurrentTime = new LTime(day, hour, minute, dayPhase); sendDayPhaseTransitionEvent(dayPhase); data.Save(); }
void refreshData() { currentDay = story.CurrentTime.Day; currentDayPhase = story.CurrentTime.Phase; }
public void SetDayPhase(LDayPhase phase) { story.SetDay(currentDay, phase, hours[(int)phase]); refresh(); }