예제 #1
0
    private void FixedUpdate()
    {
        if (_player != null && !GManager.Instance.GamePaused)
        {
            horizontal = Input.GetAxisRaw("Horizontal");

            if (Input.GetKey(jumpKey))
            {
                if (horizontal == 0)
                {
                    _player.Jump();
                }
                else
                {
                    _player.JumpMove(horizontal);
                }
            }
            else
            {
                if (horizontal != 0)
                {
                    _player.Move(horizontal);
                }
                else
                {
                    _player.MoveToIdle();
                }
            }
        }
    }