public CarAI(Car controller) { _controller = controller; _transform = _controller.transform; _movement = controller.Movement; _rigidBody = _controller.GetComponent <Rigidbody>(); _worldTransform = GameObject.Find("World").transform; }
public CarAI(Car controller) { _controller = controller; _transform = _controller.transform; _carPhysics = controller.GetComponent <CarPhysics>(); _rigidBody = _controller.GetComponent <Rigidbody>(); _worldTransform = GameObject.Find("World").transform; }
private void Start() { _car = GetComponent <Car>(); _movement = _car.Movement; }
private void Start() { _car = GetComponent <Car>(); _carPhysics = GetComponent <CarPhysics>(); }