// Use this for initialization void Start() { currentSmooth = smooth; sceneManager = GameObject.Find("SceneManager"); //the statement below automatically positions the camera behind the target. //hosMove = transform.position - target.transform.position; controllerPluggedIn controller = ControllerDetector.CheckController(); if (controller != controllerPluggedIn.noController) { controllerInput = true; } if (controllerInput) { Debug.Log("Xbox controller plugged in"); camRotateSpeed = controllerRotateSpeed; } else { Debug.Log("No controller plugged in"); camRotateSpeed = mouseRotateSpeed; } }
private void Start() { gameManager = GameObject.Find("Game Manager").GetComponent <GameManager>(); UIController = gameManager.GetComponent <UIController>(); controllerDetector = gameManager.GetComponent <ControllerDetector>(); equipment = transform.GetComponent <Equipment>(); playerAnimator = GetComponent <Animator>(); stats = GetComponent <Stats>(); rb = GetComponent <Rigidbody>(); }