Esempio n. 1
0
 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;
     }
 }
Esempio n. 2
0
    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;
         }
     }
 }