コード例 #1
0
ファイル: HR_ModApplier.cs プロジェクト: GDxU/racer2049
    public void ChangeWheels(RCC_CarControllerV3 car, GameObject wheel)
    {
        RCC_Customization.ChangeWheels(car, selectedWheel);

//		RCC_WheelCollider[] wheelColliders = car.GetComponentsInChildren<RCC_WheelCollider> ();
//
//		for (int i = 0; i < wheelColliders.Length; i++) {
//
//			if (wheelColliders[i].wheelModel.GetComponent<MeshRenderer> ())
//				wheelColliders [i].wheelModel.GetComponent<MeshRenderer> ().enabled = false;
//
//			foreach (Transform t in wheelColliders [i].wheelModel.GetComponentInChildren<Transform> ()) {
//				t.gameObject.SetActive (false);
//			}
//
//			GameObject newWheel = (GameObject)Instantiate (wheel, wheelColliders[i].wheelModel.position, wheelColliders[i].wheelModel.rotation, wheelColliders[i].wheelModel);
//
//			if (wheelColliders [i].wheelModel.localPosition.x < 0f)
//				newWheel.transform.localScale = new Vector3 (newWheel.transform.localScale.x * -1f, newWheel.transform.localScale.y, newWheel.transform.localScale.z);
//
//			//wheelColliders [i].wheelCollider.suspensionDistance = RCC_GetBounds.MaxBoundsExtent (selectedWheel.transform) / 1.15f;
//
//		}
    }
コード例 #2
0
 public void ChangeWheelsBySlider(Slider slider)
 {
     RCC_Customization.ChangeWheels(RCC_SceneManager.Instance.activePlayerVehicle, RCC_ChangableWheels.Instance.wheels[(int)slider.value].wheel);
 }
コード例 #3
0
 public void ChangeWheelsBySlider(Slider slider)
 {
     RCC_Customization.ChangeWheels(car, RCC_ChangableWheels.Instance.wheels[(int)slider.value].wheel);
 }