private void Awake() { controller = GetComponent <CharacterController>(); player = GetComponent <Player>(); jump = GetComponent <JumpPlayer>(); attack = GetComponent <MainAttackPlayer>(); touchControl = FindObjectOfType <TouchControl>(); playerInputConfiguration = GetComponent <PlayerInputConfiguration>(); maxMoveSpeed = moveSpeed; InitializeInput(); camTransform = Camera.main.transform; }
void Awake() { controller = GetComponent <CharacterController>(); player = GetComponent <Player>(); attack = GetComponent <MainAttackPlayer>(); touchControl = GameObject.FindObjectOfType <TouchControl>(); playerInputConfiguration = GetComponent <PlayerInputConfiguration>(); InitializeInput(); slopeLimit = controller.slopeLimit; jumpSlopeLimit = Mathf.Clamp(controller.slopeLimit * 2, 0f, 90f); maxJumpCount = jumpCount; }