/// <summary>
 ///
 /// </summary>
 /// <param name="dayInterval">The day(s) of the week (Sun thru Sat)</param>
 /// <param name="weekInterval">The week(s) in which the schedule recurs</param>
 /// <param name="quarterInterval">The quarter(s) in which the schedule recurs</param>
 /// <param name="monthOfOfQuarterInterval"></param>
 public ScheduleDayInQuarter(
     DayInterval dayInterval,
     WeekInterval weekInterval,
     QuarterInterval quarterInterval,
     MonthOfQuarterInterval monthOfOfQuarterInterval)
 {
     _dayInterval            = dayInterval;
     _weekInterval           = weekInterval;
     _monthOfQuarterInterval = monthOfOfQuarterInterval;
     _quarterInterval        = quarterInterval;
 }
Esempio n. 2
0
    private void Start()
    {
        Test24         = false;
        mDayTimeBuffer = DayInterval.Night;
        if (DayTime == DayInterval.Night)
        {
            mDayTimeBuffer = DayInterval.Day;
        }
        bTimeOf24 = -1;

        Shader.SetGlobalFloat("_NoLightmap", 0);
        if (InDoor)
        {
            Shader.SetGlobalFloat("_SunOutDoor", 0);
        }
        else
        {
            Shader.SetGlobalFloat("_SunOutDoor", 1);
        }
    }
Esempio n. 3
0
 public void SetDaysOfWeek(DayInterval interval)
 {
     DayInterval = interval;
 }
 /// <summary>
 /// Creates a temporaral expression using day(s) of the week as well as a WeekOfMonth.
 ///
 /// var example1 = new ScheduleDayInWeekOfMonth(DayInterval.Sunday, WeekInterval.First);
 /// var example2 = new ScheduleDayInWeekOfMonth(DayInterval.Tuesday, WeekInterval.Second);
 /// var example3 = new ScheduleDayInWeekOfMonth(DayInterval.Friday, WeekInterval.Last);
 ///
 /// </summary>
 /// <param name="dayInterval">day of week</param>
 /// <param name="weekInterval">week interval</param>
 public ScheduleDayInWeekOfMonth(DayInterval dayInterval, WeekInterval weekInterval)
 {
     _dayInterval  = dayInterval;
     _weekInterval = weekInterval;
 }
Esempio n. 5
0
 public ScheduleBuilder OnDaysOfWeek(DayInterval interval)
 {
     this.OnDaysOfWeek((int)interval);
     return(this);
 }
Esempio n. 6
0
    private void ReadTimePoint()
    {
        Material skyMat = RenderSettings.skybox;

        if (skyMat != null && !Is24Hours)
        {
            switch (DayTime)
            {
            case DayInterval.Night:
                mCube1 = NightSkyBox;
                break;

            case DayInterval.Morning:
                mCube1 = MorningSkyBox;
                break;

            case DayInterval.Day:
                mCube1 = DaySkyBox;
                break;

            case DayInterval.Dusk:
                mCube1 = DuskSkyBox;
                break;
            }
        }
        if (mCube1 != null)
        {
            skyMat.SetTexture("_Tex", mCube1);
        }
        if (mCube2 != null)
        {
            skyMat.SetTexture("_Tex2", mCube2);
        }

        mDayTimeBuffer = DayTime;

        FogColor               = ReadTimePoint(FogColorGradient, FogColor);
        FogLightColor          = ReadTimePoint(FogLightColorGradient, FogLightColor);
        FogDensity             = ReadTimePoint(FogDensityCurve, FogDensity);
        FogHeightFallOut       = ReadTimePoint(FogHeightFallOutCurve, FogHeightFallOut);
        FogStartDistance       = ReadTimePoint(FogStartDistanceCurve, FogStartDistance);
        FogHeightFallOutPos    = ReadTimePoint(FogHeightFallOutPosCurve, FogHeightFallOutPos);
        Sky_FalloutModif       = ReadTimePoint(Sky_FalloutModifCurve, Sky_FalloutModif);
        Sky_FalloutModifHeight = ReadTimePoint(Sky_FalloutModifHeightCurve, Sky_FalloutModifHeight);
        VerticalFogDensity     = ReadTimePoint(VerticalFogDensityCurve, VerticalFogDensity);
        VerticalFogHeight      = ReadTimePoint(VerticalFogHeightCurve, VerticalFogHeight);

        LightmapForce       = ReadTimePoint(LightmapForceCurve, LightmapForce);
        GlobalEmissionLevel = ReadTimePoint(GlobalEmissionLevelCurve, GlobalEmissionLevel);
        LightmapColor       = ReadTimePoint(LightmapColorGradient, LightmapColor);

        CharaLight    = ReadTimePoint(CharaLightGradient, CharaLight);
        CharaDark     = ReadTimePoint(CharaDarkGradient, CharaDark);
        CharaSkinDark = ReadTimePoint(CharaSkinDarkGradient, CharaSkinDark);

        GrassColor = ReadTimePoint(GrassColorGradient, GrassColor);

        CloudyColor      = ReadTimePoint(CloudyColorGradient, CloudyColor);
        CloudySaturation = ReadTimePoint(CloudySaturationCurve, CloudySaturation);

        if (mRainSky != null)
        {
            CloudySky = ReadTimePoint(CloudySkyGradient, CloudySky);
            Shader.SetGlobalColor("_RainSkyColor", CloudySky);
        }

        if (TestSun())
        {
            SunColorForMixer     = RenderSettings.sun.color = RainedColor(ReadTimePoint(SunColorGradient, RenderSettings.sun.color));
            SunIntensityForMixer = RenderSettings.sun.intensity = ReadTimePoint(SunIntensityCurve, RenderSettings.sun.intensity);
        }

        SkyColorForMixer     = RenderSettings.ambientSkyColor = RainedColor(ReadTimePoint(SkyEnvColorGradient, RenderSettings.ambientSkyColor));
        EquatorColorForMixer = RenderSettings.ambientEquatorColor = RainedColor(ReadTimePoint(EquatorEnvColorGradient, RenderSettings.ambientEquatorColor));
        GroundColorForMixer  = RenderSettings.ambientGroundColor = RainedColor(ReadTimePoint(GroundEnvColorGradient, RenderSettings.ambientGroundColor));
    }
Esempio n. 7
0
 /// <summary>
 /// The day of week value
 /// </summary>
 /// <param name="aDay"></param>
 public ScheduleDayOfWeek(DayInterval aDay)
 {
     _day = aDay;
 }