private void OnDayNightChange(DayNightMissive missive)
    {
        switch (missive.state)
        {
        case DayNightStateTypes.Day:
            currentNPCLightState = NPCLightStateTypes.Off;
            break;

        case DayNightStateTypes.Night:
            currentNPCLightState = NPCLightStateTypes.Low;
            break;

        case DayNightStateTypes.Sunrise:
            currentNPCLightState = NPCLightStateTypes.Off;
            break;

        case DayNightStateTypes.Sunset:
            currentNPCLightState = NPCLightStateTypes.Low;
            break;

        default:
            break;
        }
        headLights.ForEach(x => SetNPCLights(x));
        headLightRenderers.ForEach(x => SetNPCLightRenderers(x, true));
        tailLightRenderers.ForEach(x => SetNPCLightRenderers(x));
        brakeLightRenderers.ForEach(x => SetNPCLightRenderers(x));
    }
    private void DayNightStateChange()
    {
        var missive = new DayNightMissive
        {
            state = currentDayNightState
        };

        Missive.Send(missive);
    }
Exemple #3
0
    private void OnDayNightChange(DayNightMissive missive)
    {
        switch (missive.state)
        {
        case DayNightStateTypes.Day:
            OnDay();
            break;

        case DayNightStateTypes.Night:
            OnNight();
            break;

        case DayNightStateTypes.Sunrise:
            OnDay();
            break;

        case DayNightStateTypes.Sunset:
            OnNight();
            break;

        default:
            break;
        }
    }
Exemple #4
0
    private void OnDayNightChange(DayNightMissive missive)
    {
        switch (missive.state)
        {
        case DayNightStateTypes.Day:
            ToggleLight(false);
            break;

        case DayNightStateTypes.Night:
            ToggleLight(true);
            break;

        case DayNightStateTypes.Sunrise:
            ToggleLight(false);
            break;

        case DayNightStateTypes.Sunset:
            ToggleLight(true);
            break;

        default:
            break;
        }
    }