/// <summary>
    /// Sets the current time slot to the next time slot.
    /// Returns whether next time slot is in a new day.
    /// </summary>
    public bool GoToNextTimeSlot()
    {
        switch (currentTimeSlot)
        {
        case TimeSlotType.Morning:
            currentTimeSlot = TimeSlotType.Afternoon;
            break;

        case TimeSlotType.Afternoon:
            currentTimeSlot = TimeSlotType.Evening;
            break;

        case TimeSlotType.Evening:
            currentTimeSlot = TimeSlotType.Morning;

            // return fact that next time slot is in a new day
            return(true);

        default:
            // print warning to console
            Debug.LogWarning($"Invalid currentTimeSlot: {currentTimeSlot.ToString()}");
            break;
        }

        // getting here means that next time slot is in the same day
        return(false);
    }
Beispiel #2
0
    /// <summary>
    /// Returns the string ID that should be appeneded onto a load file asscoiated
    /// with the given time slot.
    /// </summary>
    /// <param name="timeSlotArg"></param>
    /// <returns></returns>
    private static string GetTimeDayIdAppend(TimeSlotType timeSlotArg)
    {
        // check cases based on given time slot and add a time slot ID appropriately
        switch (timeSlotArg)
        {
        case TimeSlotType.Morning:
            return("1");

        case TimeSlotType.Afternoon:
            return("2");

        case TimeSlotType.Evening:
            return("3");

        default:
            // print warning to console
            Debug.LogWarning("In GetTimeDayIdAppend(), invalid " +
                             $"timeSlotArg: {timeSlotArg.ToString()}");
            return("0");
        }
    }