Ejemplo n.º 1
0
        void DriftController()
        {
            DriftPointController driftController = GetComponent <DriftPointController>();

            if (driftController != null)
            {
                WheelHit rearWheelHit;

                RL_WheelCollider.GetGroundHit(out rearWheelHit);

                driftController.drifting = Mathf.Abs(rearWheelHit.sidewaysSlip) > sidewaySlipLimit;
            }
        }
Ejemplo n.º 2
0
        void Update()
        {
            if (!player)
            {
                if (GameObject.FindGameObjectWithTag("Player"))
                {
                    player = GameObject.FindGameObjectWithTag("Player").GetComponent <Statistics>();

                    if (player && player.GetComponent <DriftPointController>())
                    {
                        driftpointcontroller = player.GetComponent <DriftPointController>();
                    }
                }
            }
            else
            {
                UpdateUI();
                VehicleGUI();
            }
        }