Exemplo n.º 1
0
    void Update()
    {
        if (movement != null && movement.coll.onGround == true)
        {
            jumpValue = jumpLimit;
        }

        if (Input.GetButtonDown("Jump"))
        {
            if (jumpValue <= jumpLimit)
            {
                GetComponent <Rigidbody2D>().velocity = Vector2.up * jumpVelocity;
                jumpValue++;
            }
            if (movement != null)
            {
                movement.WallJump();
                jumpValue++;
            }
        }
    }