// Use this for initialization void Awake() { library = GameObject.FindObjectOfType <Library>(); m_WheelMeshLocalRotations = new Quaternion[4]; for (int i = 0; i < 4; i++) { m_WheelMeshLocalRotations[i] = m_WheelMeshes[i].transform.localRotation; } m_WheelColliders[0].attachedRigidbody.centerOfMass = m_CentreOfMassOffset; m_MaxHandbrakeTorque = float.MaxValue; m_Rigidbody = GetComponent <Rigidbody>(); m_CurrentTorque = m_FullTorqueOverAllWheels - (m_TractionControl * m_FullTorqueOverAllWheels); rideEffect = transform.FindChild("Particles").FindChild("RideEffect").GetComponent <Particle>(); asotSystems = transform.FindChild("Particles").FindChild("AsotSystems"); UpdateMaxSpeed(); rayAsot = transform.FindChild("Particles").FindChild("RayAsot").GetComponentsInChildren <ParticleSystem>(); carContact = GetComponent <CarContact>(); poddon = GameObject.FindObjectOfType <Poddon>(); }
// Use this for initialization void Start() { library = GameObject.FindObjectOfType <Library>(); carContact = GetComponent <CarContact>(); if (fallPrefab == null) { fallPrefab = Resources.Load("Prefabs/Particles/FallComples") as GameObject; } }
// Use this for initialization void Start() { library = GameObject.FindObjectOfType<Library>(); carContact = library.car.GetComponent<CarContact>(); }
// Use this for initialization void Awake() { library = GameObject.FindObjectOfType<Library>(); m_WheelMeshLocalRotations = new Quaternion[4]; for (int i = 0; i < 4; i++) { m_WheelMeshLocalRotations[i] = m_WheelMeshes[i].transform.localRotation; } m_WheelColliders[0].attachedRigidbody.centerOfMass = m_CentreOfMassOffset; m_MaxHandbrakeTorque = float.MaxValue; m_Rigidbody = GetComponent<Rigidbody>(); m_CurrentTorque = m_FullTorqueOverAllWheels - (m_TractionControl*m_FullTorqueOverAllWheels); rideEffect = transform.FindChild("Particles").FindChild("RideEffect").GetComponent<Particle>(); asotSystems = transform.FindChild("Particles").FindChild("AsotSystems"); UpdateMaxSpeed(); rayAsot = transform.FindChild("Particles").FindChild("RayAsot").GetComponentsInChildren<ParticleSystem>(); carContact = GetComponent<CarContact>(); poddon = GameObject.FindObjectOfType<Poddon>(); }
// Use this for initialization void Start() { library = GameObject.FindObjectOfType<Library>(); carContact = GetComponent<CarContact>(); if (fallPrefab == null) { fallPrefab = Resources.Load("Prefabs/Particles/FallComples") as GameObject; } }
// Use this for initialization void Start() { library = GameObject.FindObjectOfType <Library>(); carContact = library.car.GetComponent <CarContact>(); }