/// <summary> /// Calling by awake. /// </summary> private void Awake() { // Disable jump script. _actionJumpLogicScript = GetComponent <ActionJumpLogic>(); _actionJumpLogicScript.enabled = false; // Get the scripts and components. _playerRigidbody2D = GetComponent <Rigidbody2D>(); }
/// <summary> /// Calling before start. /// </summary> private void Awake() { // Get scripts and components. _actionJumpLogicScript = GameObject.FindGameObjectWithTag("Player").GetComponent <ActionJumpLogic>(); _movementLogicScript = GameObject.FindGameObjectWithTag("Player").GetComponent <MovementLogic>(); }
/// <summary> /// Calling before start. /// </summary> private void Awake() { // Get scripts and components. _jumpLogicScript = FindObjectOfType <ActionJumpLogic>(); }