Game Jams/Ludum Dare 46/Game/Assets/Scripts/Player/PlayerController.cs
/// <summary>
/// Update is called every frame, if the MonoBehaviour is enabled.
/// </summary>
Update is called every frame, if the MonoBehaviour is enabled.
Update is called every frame if the MonoBehaviour is enabled .
void Update()
    {
        if(Input.GetKeyDown("e") && !Pause.GetComponent<Pause>().isPaused){
            handleEvent(EventCollider);
        }
        if(Mathf.Abs(rb.velocity.y) > 1f && onLadder) {
            ladderSoundCount += Time.deltaTime;
            if (ladderSoundCount > 0.3f) {
                ladderSoundCount = 0f;
                playerSound.LadderClimb();
            }
        }
        if (rb.velocity.y < maxFallSpeed) {
            rb.velocity = new Vector2(rb.velocity.x, maxFallSpeed);
        }
    }
void Update ( ) { if ( Input . GetKeyDown ( " " ) && ! Pause . GetComponent < Pause > ( ) . isPaused ) { handleEvent ( EventCollider ) ; } if ( Mathf . Abs ( rb . velocity . y ) > 1f && onLadder ) { ladderSoundCount += Time . deltaTime ; if ( ladderSoundCount > 0.3f ) { ladderSoundCount = 0f ; playerSound . LadderClimb ( ) ; } } if ( rb . velocity . y < maxFallSpeed ) { rb . velocity = new Vector2 ( rb . velocity . x , maxFallSpeed ) ; } }
Update is called every frame, if the MonoBehaviour is enabled.
Update is called every frame if the MonoBehaviour is enabled .