Ejemplo n.º 1
0
        // Update is called once per frame
        void Update()
        {
            // TEST
            if (Input.GetKeyDown(KeyCode.U))
            {
                // Hurt yourself when you press U
                player.Hurt(10, new Vector2(1, 1));
            }


            GetInput();
            player.Move(inputH);
            player.Climb(inputV);
            if (isJumping)
            {
                player.Jump();
            }
            if (isCrouching)
            {
                player.Crouch();
            }
            else
            {
                player.UnCrouch();
            }
        }
Ejemplo n.º 2
0
 // Update is called once per frame
 void Update()
 {
     // TEST
     if (Input.GetKeyDown(KeyCode.U))
     {
         player.Hurt(10);
     }
 }