private void Start() { movement = GetComponent <CarMovement>(); driftLine = GetComponent <CarDriftLine>(); carDriftDust = GetComponent <CarDriftDust>(); carColliderCommon = GetComponent <ColliderCommon>(); ballColliderCommon = ball.GetComponent <ColliderCommon>(); carPowerUpControl = GetComponent <CarPowerUpControl>(); InitializeTempDistance(); aIState = AIStates.None; FindAllCarsExceptThis(); }
private void Awake() { movement = GetComponent <CarMovement>(); driftLine = GetComponent <CarDriftLine>(); carColliderCommon = GetComponent <ColliderCommon>(); ball = GameObject.FindGameObjectWithTag("Ball").transform; ballPosition = GameObject.FindGameObjectWithTag("BallPosition").transform; ballColliderCommon = ball.GetComponent <ColliderCommon>(); carDriftDust = GetComponent <CarDriftDust>(); animator = GetComponent <Animator>(); carPowerUpControl = GetComponent <CarPowerUpControl>(); carDirection = CarDirection.None; isAlive = true; }