Commit 0f1c8277 authored by wanqing's avatar wanqing

修改代码

parent 0bf8d7f0
......@@ -52,7 +52,12 @@ public class CarView : MonoBehaviour
}
m_rigidBody = GetComponent<Rigidbody>();
wheels = GetComponentsInChildren<WheelCollider>();
for (int i = 0; i < wheels.Length; i++)
{
wheels[i].enabled = false;
}
m_rigidBody.centerOfMass = centerOfMass.localPosition;
m_rigidBody.isKinematic = true;
m_tweenPath = GetComponent<DOTweenPath>();
m_curPoint = waypoints[0];
GameServices.inputService.pad.onTouchUp += OnTouchUp;
......@@ -300,6 +305,11 @@ public class CarView : MonoBehaviour
if (varIndex >= 3)
{
m_bIsCanMove = true;
for (int i = 0; i < wheels.Length; i++)
{
wheels[i].enabled = true;
}
m_rigidBody.isKinematic = false;
for (int i = 0; i < m_targetTrans.Length; i++)
{
Rigidbody varBody = m_targetTrans[i].GetComponent<Rigidbody>();
......
fileFormatVersion: 2
guid: 5daed4a639236a24b8b83f1f1ae7ae42
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
......@@ -633,7 +633,8 @@ PlayerSettings:
13: CROSS_PLATFORM_INPUT
14: CROSS_PLATFORM_INPUT;MOBILE_INPUT
platformArchitecture: {}
scriptingBackend: {}
scriptingBackend:
Android: 1
il2cppCompilerConfiguration: {}
managedStrippingLevel: {}
incrementalIl2cppBuild: {}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment