private void Awake() { _sphereCollider = GetComponent <SphereCollider>(); _swordProgressiveColliders = GetComponent <SwordProgressiveColliders>(); _scannerIntersectionManager = GetComponent <ScannerIntersectionManager>(); _playerInsideVolume = GameObject.Find("Player").GetComponent <PlayerInsideVolume>(); _parenting = GetComponent <SimulateParent>(); }
private void Awake() { characterController = GetComponent <CharacterController>(); combatController = GetComponent <PlayerCombatController>(); playerSounds = GetComponent <PlayerSounds>(); cameraTransform = Camera.main.gameObject.transform; _input = new InputActions(); scannerSword = FindObjectOfType <PlayerSwordScanner>(); scannerCollider = scannerSword.GetComponent <SphereCollider>(); scannerIntersect = FindObjectOfType <ScannerIntersectionManager>(); _input.PlayerControls.Move.performed += callbackContext => movementVector = callbackContext.ReadValue <Vector2>(); _input.PlayerControls.Jump.started += callbackContext => JumpInput(); _input.PlayerControls.MoveObject.started += callbackContext => inputMoveObject = true; _input.PlayerControls.MoveObject.canceled += callbackContext => inputMoveObject = false; }