Exemplo n.º 1
0
    // 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>();
    }
Exemplo n.º 2
0
    // Use this for initialization
    void Start()
    {
        library    = GameObject.FindObjectOfType <Library>();
        carContact = GetComponent <CarContact>();

        if (fallPrefab == null)
        {
            fallPrefab = Resources.Load("Prefabs/Particles/FallComples") as GameObject;
        }
    }
Exemplo n.º 3
0
 // Use this for initialization
 void Start()
 {
     library = GameObject.FindObjectOfType<Library>();
     carContact = library.car.GetComponent<CarContact>();
 }
Exemplo n.º 4
0
    // 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>();
    }
Exemplo n.º 5
0
    // Use this for initialization
    void Start()
    {
        library = GameObject.FindObjectOfType<Library>();
        carContact = GetComponent<CarContact>();

        if (fallPrefab == null)
        {
            fallPrefab = Resources.Load("Prefabs/Particles/FallComples") as GameObject;
        }
    }
Exemplo n.º 6
0
 // Use this for initialization
 void Start()
 {
     library    = GameObject.FindObjectOfType <Library>();
     carContact = library.car.GetComponent <CarContact>();
 }