Exemple #1
0
        private void Awake()
        {
            // get the car controller
            m_Car = GetComponent <CarController>();

            //get the steering wheel controller
            m_SteeringWheel = GetComponentInChildren <VisualSteeringWheelController>();
        }
Exemple #2
0
        private void Awake()
        {
            // get the car controller
            m_Car = GetComponent<CarController>();

            //get the steering wheel controller
            m_SteeringWheel = GetComponentInChildren<VisualSteeringWheelController>();
        }
Exemple #3
0
        /* Awake */

        private void Awake()
        {
            m_CarController              = GetComponent <CarController> ();
            m_Rigidbody                  = GetComponent <Rigidbody> ();
            m_SteeringWheel              = GetComponentInChildren <VisualSteeringWheelController> ();
            m_Sensors                    = GetComponent <Sensors> ();
            m_sensorResponseHandlers     = GetComponents <SensorResponseHandler> ();
            IsAvoidingObstacle           = false;
            ObstacleAvoidanceSteerAmount = 1f;

            // give the random perlin a random value
            m_RandomPerlin = Random.value * 100;

            if (m_isUser)
            {
                IsUser = true;
            }

            progressNum = 0;
            SetTarget(circuit.Waypoints [progressNum], false);
        }
Exemple #4
0
		/* Awake */

		private void Awake ()
		{
			m_CarController = GetComponent<CarController> ();
			m_Rigidbody = GetComponent<Rigidbody> ();
			m_SteeringWheel = GetComponentInChildren<VisualSteeringWheelController> ();
			m_Sensors = GetComponent<Sensors> ();
			m_sensorResponseHandlers = GetComponents<SensorResponseHandler> ();
			IsAvoidingObstacle = false;
			ObstacleAvoidanceSteerAmount = 1f;

            // give the random perlin a random value
            m_RandomPerlin = Random.value * 100;

			if (m_isUser) {
				IsUser = true;
			}

			progressNum = 0;
			SetTarget (circuit.Waypoints [progressNum], false);
		}