Exemplo n.º 1
0
    void Awake()
    {
        manage        = this;
        carController = GetComponent <RCC_CarControllerV3>();
        carCamera     = GameObject.FindObjectOfType <RCC_Camera>().gameObject;
        if (!getOutPos)
        {
            GameObject geto = new GameObject("Get Out From Car");
            geto.transform.SetParent(transform);
            geto.transform.localPosition                = new Vector3(-3f, 0f, 0f);
            geto.AddComponent <BoxCollider>().tag       = "inOut";
            geto.GetComponent <BoxCollider>().isTrigger = true;
            getOutPos = geto.transform;
        }


        if (!getOutPosition)
        {
            GameObject getOutPos = new GameObject("Get Out Position");
            getOutPos.transform.SetParent(transform);
            getOutPos.transform.localPosition = new Vector3(-3f, 0f, 0f);
            getOutPos.transform.localRotation = Quaternion.identity;
            getOutPosition = getOutPos.transform;
        }
    }
 private void Awake()
 {
     //Load mesh data
     _carController = GetComponent <RCC_CarControllerV3>();
     //LoadOriginalMeshData();
     DamageMeshInitialize();
 }
Exemplo n.º 3
0
    void Start()
    {
        rigid = GetComponent <Rigidbody>();
        joint = GetComponentInParent <ConfigurableJoint> ();
        jointRestrictions.Get(joint);

        rigid.interpolation          = RigidbodyInterpolation.None;
        rigid.interpolation          = RigidbodyInterpolation.Interpolate;
        joint.configuredInWorldSpace = true;

        allWheelColliders = GetComponentsInChildren <WheelCollider> ();

        for (int i = 0; i < allWheelColliders.Length; i++)
        {
            if (allWheelColliders[i].transform.localPosition.x < 0f)
            {
                leftWheelColliders.Add(allWheelColliders[i]);
            }
            else
            {
                rightWheelColliders.Add(allWheelColliders[i]);
            }
        }

        if (joint.connectedBody)
        {
            AttachTrailer(joint.connectedBody.gameObject.GetComponent <RCC_CarControllerV3> ());
        }
        else
        {
            carController       = null;
            joint.connectedBody = null;
            jointRestrictions.Reset(joint);
        }
    }
Exemplo n.º 4
0
 void OnTriggerExit(Collider col)
 {
     if (col.gameObject.GetComponentInParent <RCC_CarControllerV3> ())
     {
         targetVehicle = null;
     }
 }
Exemplo n.º 5
0
 // get the players upgarde after each level change
 public void PlayerUpgrade()
 {
     if (isShooter) // in case of player(Shooter)
     {
         try
         {
             InteractiveWeapon activeWeapon = this.GetComponent <WeaponHandling>().Weapon;
             activeWeapon.recoilAngle  = 0f;
             activeWeapon.bulletDamage = 50;
             activeWeapon.upgradeWeapon();
         }
         catch (Exception e)
         {
             print("No Weapon");
         }
     }
     else if (isDriver) // in case of driver(Shooter)
     {
         try
         {
             RCC_CarControllerV3 carController = this.GetComponent <RCC_CarControllerV3>();
             carController.useNOS          = true;
             carController.useTurbo        = true;
             carController.useExhaustFlame = true;
         }
         catch (Exception e)
         {
             print("No shooter");
         }
     }
 }
    void Start()
    {
        // Getting RCC, wheelcolliders, rigidbody, and Network Identity of the vehicle.
        carController  = GetComponent <RCC_CarControllerV3>();
        wheelColliders = GetComponentsInChildren <RCC_WheelCollider> ();
        rigid          = GetComponent <Rigidbody>();
        networkID      = GetComponent <NetworkIdentity> ();

        // If we are the owner of this vehicle, disable external controller and enable controller of the vehicle. Do opposite if we don't own this.
        if (isLocalPlayer)
        {
            carController.externalController = false;
            carController.SetCanControl(true);
        }
        else
        {
            carController.externalController = true;
            carController.SetCanControl(false);
        }

        // Setting name of the gameobject with Network ID.
        gameObject.name = gameObject.name + networkID.netId;

        currentVehicleTransform = new VehicleTransform();
    }
    private void CreateVehicles()
    {
        for (int i = 0; i < RCC_DemoVehicles.Instance.vehicles.Length; i++)
        {
            // Spawning the vehicle with no controllable, no player, and engine off. We don't want to let player control the vehicle while in selection menu.
            RCC_CarControllerV3 spawnedVehicle = RCC.SpawnRCC(RCC_DemoVehicles.Instance.vehicles[i], spawnPosition.position, spawnPosition.rotation, false, false, false);

            // Disabling spawned vehicle.
            spawnedVehicle.gameObject.SetActive(false);

            // Adding and storing it in _spawnedVehicles list.
            _spawnedVehicles.Add(spawnedVehicle);
        }

        SpawnVehicle();

        // If RCC Camera is choosen, it wil enable RCC_CameraCarSelection script. This script was used for orbiting camera.
        if (RCCCamera)
        {
            if (RCCCamera.GetComponent <RCC_CameraCarSelection> ())
            {
                RCCCamera.GetComponent <RCC_CameraCarSelection> ().enabled = true;
            }
        }
    }
Exemplo n.º 8
0
    void FixedUpdate()
    {
        carController = RCC_SceneManager.Instance.activePlayerVehicle;

        if (!carController)
        {
            return;
        }

        switch (mode)
        {
        case Mode.Neutral:

            break;

        case Mode.Play:

            carController.externalController = true;

            break;

        case Mode.Record:

            Inputs.Add(new PlayerInput(carController.gasInput, carController.brakeInput, carController.steerInput, carController.handbrakeInput, carController.clutchInput, carController.boostInput, carController.idleInput, carController.fuelInput, carController.direction, carController.canGoReverseNow, carController.currentGear, carController.changingGear, carController.indicatorsOn, carController.lowBeamHeadLightsOn, carController.highBeamHeadLightsOn));
            Transforms.Add(new PlayerTransform(carController.transform.position, carController.transform.rotation));
            RigidBodies.Add(new PlayerRigidBody(carController.rigid.velocity, carController.rigid.angularVelocity));

            break;
        }
    }
Exemplo n.º 9
0
 void RCC_CarControllerV3_OnRCCSpawned(RCC_CarControllerV3 RCC)
 {
     if (!RCC.AIController)
     {
         GetVehicles();
     }
 }
Exemplo n.º 10
0
 public void Start()
 {
     carController = GetComponent <RCC_CarControllerV3>();
     carRigidbody  = GetComponent <Rigidbody>();
     carStopped    = false;
     Invoke("GiveGas", 1);
 }
Exemplo n.º 11
0
    public void RemoveTarget()
    {
        transform.SetParent(null);

        playerCar   = null;
        playerRigid = null;
    }
Exemplo n.º 12
0
    void Awake()
    {
        carController = GetComponent <RCC_CarControllerV3>();

        defMaxSpeed = carController.maxspeed;
        defHandling = carController.highwaySteeringHelper;
        defMaxBrake = carController.highwayBrakingHelper;

        if (PlayerPrefs.HasKey(transform.name + "SelectedWheel"))
        {
            wheelIndex    = PlayerPrefs.GetInt(transform.name + "SelectedWheel", 0);
            selectedWheel = HR_Wheels.Instance.wheels[wheelIndex].wheel;
        }
        else
        {
            selectedWheel = null;
        }

        _speedLevel    = PlayerPrefs.GetInt(transform.name + "SpeedLevel");
        _handlingLevel = PlayerPrefs.GetInt(transform.name + "HandlingLevel");
        _brakeLevel    = PlayerPrefs.GetInt(transform.name + "BrakeLevel");

        bodyColor        = PlayerPrefsX.GetColor(transform.name + "BodyColor", HR_HighwayRacerProperties.Instance._defaultBodyColor);
        isSirenPurchased = PlayerPrefsX.GetBool(transform.name + "Siren", false);
        isSirenAttached  = PlayerPrefsX.GetBool(transform.name + "SirenAttached", false);

        isNOSPurchased   = PlayerPrefsX.GetBool(transform.name + "NOS", false);
        isTurboPurchased = PlayerPrefsX.GetBool(transform.name + "Turbo", false);
    }
Exemplo n.º 13
0
    /// <summary>
    /// Change Wheel Models. You can find your wheel array in Tools --> BCG --> RCC --> Configure Changable Wheels.
    /// </summary>
    public static void ChangeWheels(RCC_CarControllerV3 car, GameObject wheel)
    {
        for (int i = 0; i < car.allWheelColliders.Length; i++)
        {
            if (car.allWheelColliders [i].wheelModel.GetComponent <MeshRenderer> ())
            {
                car.allWheelColliders [i].wheelModel.GetComponent <MeshRenderer> ().enabled = false;
            }

            foreach (Transform t in car.allWheelColliders[i].wheelModel.GetComponentInChildren <Transform> ())
            {
                t.gameObject.SetActive(false);
            }

            Instantiate(wheel, car.allWheelColliders[i].wheelModel.position, car.allWheelColliders[i].wheelModel.rotation, car.allWheelColliders[i].wheelModel);

//			if (car.allWheelColliders [i].wheelModel.localScale.x > 0) {
//
//				if (car.allWheelColliders [i].wheelModel.localPosition.x > 0f)
//					newWheel.transform.localScale = new Vector3 (newWheel.transform.localScale.x * -1f, newWheel.transform.localScale.y, newWheel.transform.localScale.z);
//
//			}
        }

        UpdateRCC(car);
    }
Exemplo n.º 14
0
    void Start()
    {
        rigid         = GetComponent <Rigidbody>();
        carController = transform.GetComponentInParent <RCC_CarControllerV3>();

        rigid.interpolation = RigidbodyInterpolation.None;
        rigid.interpolation = RigidbodyInterpolation.Interpolate;

        antiRoll = carController.antiRollFrontHorizontal;

        for (int i = 0; i < wheelColliders.Length; i++)
        {
            if (wheelColliders[i].transform.localPosition.x < 0f)
            {
                leftWheelColliders.Add(wheelColliders[i]);
            }
            else
            {
                rightWheelColliders.Add(wheelColliders[i]);
            }
        }

        gameObject.SetActive(false);
        gameObject.SetActive(true);
    }
Exemplo n.º 15
0
    void Start()
    {
        if (RCCSettings.dontUseAnyParticleEffects)
        {
            Destroy(gameObject);
            return;
        }

        carController = GetComponentInParent <RCC_CarControllerV3>();
        particle      = GetComponent <ParticleSystem>();
        emission      = particle.emission;

        if (flame)
        {
            subEmission           = flame.emission;
            flameLight            = flame.GetComponentInChildren <Light>();
            flameSource           = RCC_CreateAudioSource.NewAudioSource(gameObject, "Exhaust Flame AudioSource", 10f, 25f, 1f, RCCSettings.exhaustFlameClips[0], false, false, false);
            flameLight.renderMode = RCCSettings.useLightsAsVertexLights ? LightRenderMode.ForceVertex : LightRenderMode.ForcePixel;
        }

        lensFlare = GetComponentInChildren <LensFlare> ();

        if (flameLight)
        {
            if (flameLight.flare != null)
            {
                flameLight.flare = null;
            }
        }
    }
Exemplo n.º 16
0
    /// <summary>
    /// Set All Suspension targetPositions. It changes targetPosition of the all WheelColliders.
    /// </summary>
    public static void SetAllSuspensionsTargetPos(RCC_CarControllerV3 vehicle, float targetPosition)
    {
        if (!CheckVehicle(vehicle))
        {
            return;
        }

        targetPosition = Mathf.Clamp01(targetPosition);

        JointSpring spring1 = vehicle.RearLeftWheelCollider.wheelCollider.suspensionSpring;

        spring1.targetPosition = 1f - targetPosition;

        vehicle.RearLeftWheelCollider.wheelCollider.suspensionSpring = spring1;

        JointSpring spring2 = vehicle.RearRightWheelCollider.wheelCollider.suspensionSpring;

        spring2.targetPosition = 1f - targetPosition;

        vehicle.RearRightWheelCollider.wheelCollider.suspensionSpring = spring2;

        JointSpring spring3 = vehicle.FrontLeftWheelCollider.wheelCollider.suspensionSpring;

        spring3.targetPosition = 1f - targetPosition;

        vehicle.FrontLeftWheelCollider.wheelCollider.suspensionSpring = spring3;

        JointSpring spring4 = vehicle.FrontRightWheelCollider.wheelCollider.suspensionSpring;

        spring4.targetPosition = 1f - targetPosition;

        vehicle.FrontRightWheelCollider.wheelCollider.suspensionSpring = spring4;

        OverrideRCC(vehicle);
    }
Exemplo n.º 17
0
    /// <summary>
    /// Change Wheel Models. You can find your wheel models array in Tools --> BCG --> RCC --> Configure Changable Wheels.
    /// </summary>
    public static void ChangeWheels(RCC_CarControllerV3 vehicle, GameObject wheel, bool applyRadius)
    {
        if (!CheckVehicle(vehicle))
        {
            return;
        }

        for (int i = 0; i < vehicle.allWheelColliders.Length; i++)
        {
            if (vehicle.allWheelColliders [i].wheelModel.GetComponent <MeshRenderer> ())
            {
                vehicle.allWheelColliders [i].wheelModel.GetComponent <MeshRenderer> ().enabled = false;
            }

            foreach (Transform t in vehicle.allWheelColliders[i].wheelModel.GetComponentInChildren <Transform> ())
            {
                t.gameObject.SetActive(false);
            }

            GameObject newWheel = (GameObject)Instantiate(wheel, vehicle.allWheelColliders[i].wheelModel.position, vehicle.allWheelColliders[i].wheelModel.rotation, vehicle.allWheelColliders[i].wheelModel);

            if (vehicle.allWheelColliders [i].wheelModel.localPosition.x > 0f)
            {
                newWheel.transform.localScale = new Vector3(newWheel.transform.localScale.x * -1f, newWheel.transform.localScale.y, newWheel.transform.localScale.z);
            }

            if (applyRadius)
            {
                vehicle.allWheelColliders [i].wheelCollider.radius = RCC_GetBounds.MaxBoundsExtent(wheel.transform);
            }
        }

        OverrideRCC(vehicle);
    }
Exemplo n.º 18
0
    /// <summary>
    /// Set Customization Mode. This will enable / disable controlling the car, and enable / disable orbit camera mode.
    /// </summary>
    public static void SetCustomizationMode(RCC_CarControllerV3 car, bool state)
    {
        if (!car)
        {
            Debug.LogError("Player Car is not selected for customization!");
            return;
        }

        if (state)
        {
            car.canControl = false;

            if (GameObject.FindObjectOfType <RCC_Camera> ())
            {
                RCC_Camera cam = GameObject.FindObjectOfType <RCC_Camera> ();
                cam.ChangeCamera(RCC_Camera.CameraMode.ORBIT);
                cam.useOnlyWhenHold = true;
            }
        }
        else
        {
            SetSmokeParticle(car, false);
            SetExhaustFlame(car, false);
            car.canControl = true;

            if (GameObject.FindObjectOfType <RCC_Camera> ())
            {
                GameObject.FindObjectOfType <RCC_Camera> ().ChangeCamera(RCC_Camera.CameraMode.TPS);
                GameObject.FindObjectOfType <RCC_Camera> ().useOnlyWhenHold = false;
            }
        }
    }
Exemplo n.º 19
0
 void RCC_CarControllerV3_OnRCCPlayerDestroyed(RCC_CarControllerV3 RCC)
 {
     if (allVehicles.Contains(RCC))
     {
         allVehicles.Remove(RCC);
     }
 }
Exemplo n.º 20
0
    /// <summary>
    /// Set Rear Suspension Distances.
    /// </summary>
    public static void SetRearSuspensionsDistances(RCC_CarControllerV3 vehicle, float distance)
    {
        if (!CheckVehicle(vehicle))
        {
            return;
        }

        if (distance <= 0)
        {
            distance = .05f;
        }

        vehicle.RearLeftWheelCollider.wheelCollider.suspensionDistance  = distance;
        vehicle.RearRightWheelCollider.wheelCollider.suspensionDistance = distance;

        if (vehicle.ExtraRearWheelsCollider != null && vehicle.ExtraRearWheelsCollider.Length > 0)
        {
            foreach (RCC_WheelCollider wc in vehicle.ExtraRearWheelsCollider)
            {
                wc.wheelCollider.suspensionDistance = distance;
            }
        }

        OverrideRCC(vehicle);
    }
    void Start()
    {
        // Getting main controller.
        carController = GetComponent <RCC_CarControllerV3>();
        carController.externalController = true;

        // If Waypoints Container is not selected in Inspector Panel, find it on scene.
        if (!waypointsContainer)
        {
            waypointsContainer = FindObjectOfType(typeof(RCC_AIWaypointsContainer)) as RCC_AIWaypointsContainer;
        }

        // Creating our Navigator and setting properties.
        GameObject navigatorObject = new GameObject("Navigator");

        navigatorObject.transform.SetParent(transform, false);
        navigator                   = navigatorObject.AddComponent <NavMeshAgent>();
        navigator.radius            = 1;
        navigator.speed             = 1;
        navigator.angularSpeed      = 100000f;
        navigator.acceleration      = 100000f;
        navigator.height            = 1;
        navigator.avoidancePriority = 99;

        // Creating our Detector and setting properties. Used for getting nearest target gameobjects.
        detector = new GameObject("Detector");
        detector.transform.SetParent(transform, false);
        detector.gameObject.AddComponent <SphereCollider> ();
        detector.GetComponent <SphereCollider> ().isTrigger = true;
        detector.GetComponent <SphereCollider> ().radius    = detectorRadius;
    }
Exemplo n.º 22
0
    /// <summary>
    /// Overrides the behavior.
    /// </summary>
    public void SetBehavior(RCC_CarControllerV3 carController)
    {
        if (RCC_Settings.Instance.selectedBehaviorType == null)
        {
            return;
        }

        RCC_Settings.BehaviorType currentBehaviorType = RCC_Settings.Instance.selectedBehaviorType;

        carController.steeringHelper = currentBehaviorType.steeringHelper;
        carController.tractionHelper = currentBehaviorType.tractionHelper;
        carController.ABS            = currentBehaviorType.ABS;
        carController.ESP            = currentBehaviorType.ESP;
        carController.TCS            = currentBehaviorType.TCS;

        carController.highspeedsteerAngle        = Mathf.Clamp(carController.highspeedsteerAngle, currentBehaviorType.highSpeedSteerAngleMinimum, currentBehaviorType.highSpeedSteerAngleMaximum);
        carController.highspeedsteerAngleAtspeed = Mathf.Clamp(carController.highspeedsteerAngleAtspeed, currentBehaviorType.highSpeedSteerAngleAtspeedMinimum, currentBehaviorType.highSpeedSteerAngleAtspeedMaximum);

        carController.steerHelperAngularVelStrength = Mathf.Clamp(carController.steerHelperAngularVelStrength, currentBehaviorType.steerHelperAngularVelStrengthMinimum, currentBehaviorType.steerHelperAngularVelStrengthMaximum);
        carController.steerHelperLinearVelStrength  = Mathf.Clamp(carController.steerHelperLinearVelStrength, currentBehaviorType.steerHelperLinearVelStrengthMinimum, currentBehaviorType.steerHelperLinearVelStrengthMaximum);

        carController.tractionHelperStrength  = Mathf.Clamp(carController.tractionHelperStrength, currentBehaviorType.tractionHelperStrengthMinimum, currentBehaviorType.tractionHelperStrengthMaximum);
        carController.antiRollFrontHorizontal = Mathf.Clamp(carController.antiRollFrontHorizontal, currentBehaviorType.antiRollFrontHorizontalMinimum, Mathf.Infinity);
        carController.antiRollRearHorizontal  = Mathf.Clamp(carController.antiRollRearHorizontal, currentBehaviorType.antiRollRearHorizontalMinimum, Mathf.Infinity);

        carController.gearShiftingDelay = Mathf.Clamp(carController.gearShiftingDelay, 0f, currentBehaviorType.gearShiftingDelayMaximum);
        carController.rigid.angularDrag = Mathf.Clamp(carController.rigid.angularDrag, currentBehaviorType.angularDrag, 1f);
    }
Exemplo n.º 23
0
    void Update()
    {
        if (activePlayerVehicle)
        {
            if (activePlayerVehicle != lastActivePlayerVehicle)
            {
                if (OnVehicleChanged != null)
                {
                    OnVehicleChanged();
                }
            }

            lastActivePlayerVehicle = activePlayerVehicle;
        }

        if (disableUIWhenNoPlayerVehicle && activePlayerCanvas)
        {
            CheckCanvas();
        }

        //if (Input.GetKeyDown (RCC_Settings.Instance.recordKB))
        //	RCC.StartStopRecord ();

        //if (Input.GetKeyDown (RCC_Settings.Instance.playbackKB))
        //	RCC.StartStopReplay ();

        //if (Input.GetKey (RCC_Settings.Instance.slowMotionKB))
        //	Time.timeScale = .2f;

        //if (Input.GetKeyUp (RCC_Settings.Instance.slowMotionKB))
        //	Time.timeScale = orgTimeScale;

        //	if(Input.GetButtonDown("Cancel"))
        //		Cursor.lockState = CursorLockMode.None;

        activeMainCamera = Camera.main;

        //switch (recorder.mode) {

        //case RCC_Recorder.Mode.Neutral:

        //	recordMode = RecordMode.Neutral;

        //	break;

        //	case RCC_Recorder.Mode.Play:

        //	recordMode = RecordMode.Play;

        //	break;

        //	case RCC_Recorder.Mode.Record:

        //	recordMode = RecordMode.Record;

        //	break;

        //	}
    }
Exemplo n.º 24
0
 void Start()
 {
     carController = GetComponent <RCC_CarControllerV3>();
     if (carController != null)
     {
         trackingVehicleDamage = true;
     }
 }
Exemplo n.º 25
0
 private void Start()
 {
     carController = FindObjectOfType <RCC_CarControllerV3>();
     cashSnd       = GameObject.Find("ch");
     timerContainer.SetActive(false);
     isWin          = false;
     isMissionStart = false;
 }
Exemplo n.º 26
0
 void InvertCamera()
 {
     cam = GetComponent <Camera>();
     cam.ResetWorldToCameraMatrix();
     cam.ResetProjectionMatrix();
     cam.projectionMatrix *= Matrix4x4.Scale(new Vector3(-1, 1, 1));
     carController         = GetComponentInParent <RCC_CarControllerV3>();
 }
Exemplo n.º 27
0
    /// <summary>
    /// Resets all stats with PlayerPrefs.
    /// </summary>
    public static void ResetStats(RCC_CarControllerV3 car, RCC_CarControllerV3 defaultCar)
    {
        SetFrontCambers(car, defaultCar.FrontLeftWheelCollider.camber);
        SetRearCambers(car, defaultCar.RearLeftWheelCollider.camber);

        SetFrontSuspensionsDistances(car, defaultCar.FrontLeftWheelCollider.wheelCollider.suspensionDistance);
        SetRearSuspensionsDistances(car, defaultCar.RearLeftWheelCollider.wheelCollider.suspensionDistance);

        SetFrontSuspensionsSpringForce(car, defaultCar.FrontLeftWheelCollider.wheelCollider.suspensionSpring.spring);
        SetRearSuspensionsSpringForce(car, defaultCar.RearLeftWheelCollider.wheelCollider.suspensionSpring.spring);

        SetFrontSuspensionsSpringDamper(car, defaultCar.FrontLeftWheelCollider.wheelCollider.suspensionSpring.damper);
        SetRearSuspensionsSpringDamper(car, defaultCar.RearLeftWheelCollider.wheelCollider.suspensionSpring.damper);

        SetMaximumSpeed(car, defaultCar.maxspeed);
        SetMaximumBrake(car, defaultCar.brakeTorque);
        SetMaximumTorque(car, defaultCar.engineTorque);

        string drvtrn = defaultCar._wheelTypeChoise.ToString();

        switch (drvtrn)
        {
        case "FWD":
            car._wheelTypeChoise = RCC_CarControllerV3.WheelType.FWD;
            break;

        case "RWD":
            car._wheelTypeChoise = RCC_CarControllerV3.WheelType.RWD;
            break;

        case "AWD":
            car._wheelTypeChoise = RCC_CarControllerV3.WheelType.AWD;
            break;
        }

        SetGearShiftingThreshold(car, defaultCar.gearShiftingThreshold);
        SetClutchThreshold(car, defaultCar.clutchInertia);

        SetCounterSteering(car, defaultCar.applyCounterSteering);

        SetABS(car, defaultCar.ABS);
        SetESP(car, defaultCar.ESP);
        SetTCS(car, defaultCar.TCS);
        SetSH(car, defaultCar.steeringHelper);

        SetNOS(car, defaultCar.useNOS);
        SetTurbo(car, defaultCar.useTurbo);
        SetUseExhaustFlame(car, defaultCar.useExhaustFlame);
        SetSteeringSensitivity(car, defaultCar.steerAngleSensitivityAdjuster);
        SetRevLimiter(car, defaultCar.useRevLimiter);
        SetClutchMargin(car, defaultCar.useClutchMarginAtFirstGear);

        SetSmokeColor(car, 0, Color.white);
        SetHeadlightsColor(car, Color.white);

        SaveStats(car);
        UpdateRCC(car);
    }
Exemplo n.º 28
0
    /// <summary>
    ///	 Enable / Disable Smoke Particles. You can use it for previewing current wheel smokes.
    /// </summary>
    public static void SetSmokeParticle(RCC_CarControllerV3 vehicle, bool state)
    {
        if (!CheckVehicle(vehicle))
        {
            return;
        }

        vehicle.PreviewSmokeParticle(state);
    }
Exemplo n.º 29
0
    /// <summary>
    /// Enable / Disable Steering Helper.
    /// </summary>
    public static void SetSH(RCC_CarControllerV3 vehicle, bool state)
    {
        if (!CheckVehicle(vehicle))
        {
            return;
        }

        vehicle.steeringHelper = state;
    }
Exemplo n.º 30
0
    /// <summary>
    ///	 Updates RCC while vehicle is inactive.
    /// </summary>
    public static void OverrideRCC(RCC_CarControllerV3 vehicle)
    {
        if (!CheckVehicle(vehicle))
        {
            return;
        }

//		vehicle.isSleeping = false;
    }