Ejemplo n.º 1
0
 private void LateUpdate()
 {
     if (isHolding)
     {
         movementComponent.MoveCharacter(direction);
     }
 }
Ejemplo n.º 2
0
    void FixedUpdate()
    {
        //Send input to the Movement Component in order to move the character

        movementComponent.MoveCharacter(Input.GetAxis("Horizontal"));
        if (Input.GetKeyDown(KeyCode.UpArrow))
        {
            movementComponent.Jump();
        }
    }
Ejemplo n.º 3
0
    void FixedUpdate()
    {
        //Send input to the Movement Component in order to move the character
        movementComponent.MoveCharacter(Input.GetAxis("Horizontal"));

        //Check if the Up Arrow has been pressed, and if so, send the Jump input to the Movement Component
        if (Input.GetKeyDown(KeyCode.UpArrow))
        {
            movementComponent.Jump();
        }
    }