void ClimbDown() { if (!_sceneController.IsOnHiddenObjectsScene() && LadderObj.AllowUseLadder()) { player.GetComponent <Rigidbody2D>().transform.position += Vector3.down * mainSpeed * Time.deltaTime; PlayerMove.currentPlayerAction = PlayerMove.PlayerStates.Climbing; } else if (_sceneController.IsOnHiddenObjectsScene()) { player.GetComponent <Rigidbody2D>().transform.position += Vector3.down * mainSpeed * Time.deltaTime; } }
void SetMozartRigidbody() { var rb = player.GetComponent <Rigidbody2D>(); if (LadderObj.AllowUseLadder() || _sceneController.IsOnHiddenObjectsScene()) { rb.gravityScale = 0; } else { rb.gravityScale = 1; } }
public static void UpdateIfNeed() { //TODO fix problem on climb down if (LadderObj.AllowUseLadder()) { if (activateLower && !MiddleLadder.GetActivateStatus() && !UpperLadder.GetActivateStatus() || !activateLower && MiddleLadder.GetActivateStatus() && !UpperLadder.GetActivateStatus() || !activateLower && !MiddleLadder.GetActivateStatus() && UpperLadder.GetActivateStatus()) { turnDeny = true; } else { turnDeny = false; } } }