public SmoothCameraMovement getCameraController() { if (cameraController == null) { cameraController = mainCamera.GetComponent <SmoothCameraMovement>(); } return(cameraController); }
void Awake() { pm = Player.PlayerManager.instance; UpdatePlayerGoldText(); SwitchTab(0); scm = FindObjectOfType <SmoothCameraMovement>(); cs = FindObjectsOfType <ContainerSystem>(); }
void OnTriggerEnter(Collider other) { if (other.CompareTag("Player") && !isTurning) { playerObject = other.transform; player = playerObject.GetComponent <PlayerMachine>(); camera = player.gameManager.mainCamera.GetComponent <SmoothCameraMovement>(); input = player.gameManager.controller; startRotation = playerObject.rotation.eulerAngles; isTurning = true; StartCoroutine(turnPlayer(targetRotation, false)); } }