Ejemplo n.º 1
0
        protected void UpdateVehicleToCurrentStage()
        {
            PatternStageType type = currentStageData.Stage.Type;

            if (type == PatternStageType.None)
            {
                LeftHeadlight.SetActive(false);
                RightHeadlight.SetActive(false);

                LeftTailLight.SetActive(false);
                RightTailLight.SetActive(false);

                LeftBrakeLight.SetActive(false);
                RightBrakeLight.SetActive(false);
                MiddleBrakeLight.SetActive(false);
                return;
            }


            LeftHeadlight.SetActive((type & PatternStageType.LeftHeadlight) == PatternStageType.LeftHeadlight);
            RightHeadlight.SetActive((type & PatternStageType.RightHeadlight) == PatternStageType.RightHeadlight);

            LeftTailLight.SetActive((type & PatternStageType.LeftTailLight) == PatternStageType.LeftTailLight);
            RightTailLight.SetActive((type & PatternStageType.RightTailLight) == PatternStageType.RightTailLight);

            LeftBrakeLight.SetActive((type & PatternStageType.LeftBrakeLight) == PatternStageType.LeftBrakeLight);
            RightBrakeLight.SetActive((type & PatternStageType.RightBrakeLight) == PatternStageType.RightBrakeLight);
            MiddleBrakeLight.SetActive(false);
        }
Ejemplo n.º 2
0
        public void ResetVehicleLights()
        {
            if (Vehicle)
            {
                LeftHeadlight.SetActive(true);
                RightHeadlight.SetActive(true);

                LeftTailLight.SetActive(true);
                RightTailLight.SetActive(true);

                LeftBrakeLight.SetActive(true);
                RightBrakeLight.SetActive(true);
                MiddleBrakeLight.SetActive(true);

                NativeFunction.Natives.SetVehicleLights(Vehicle, 0);
                Vehicle.SetLightMultiplier(1.0f);
            }
        }