Esempio n. 1
0
    void Move()
    {
        if (playerInput == null)
        {
            playerInput = GameManager.Instance.InputController.State;
            if (playerInput == null)
            {
                return;
            }
        }

        Move(playerInput.Horizontal, playerInput.Vertical);
    }
Esempio n. 2
0
        private void Instance_OnDragEvent(InputController.InputState state, Vector2 pos)
        {
            if (state == InputController.InputState.endDrag)
            {
                return;
            }

            if (state == InputController.InputState.startDrag)
            {
                lastMouse = pos;
            }

            rotationSpeedX += (pos.x - lastMouse.x) * 0.05f;
            rotationSpeedY += -(pos.y - lastMouse.y) * 0.05f;



            lastMouse = pos;
        }
    void Move()
    {
        if (!Player.IsLocalPlayer)
        {
            return;
        }

        if (playerInput == null)
        {
            playerInput = GameManager.Instance.InputController.State;
            if (playerInput == null)
            {
                return;
            }
        }
        if (!GameManager.Instance.IsNetworkGame)
        {
            Move(playerInput.Horizontal, playerInput.Vertical);
        }
    }
 public void SetInputState(InputController.InputState state)
 {
     m_InputState = state;
 }
Esempio n. 5
0
 public void SetInputController(InputController.InputState state)
 {
     playerInput = state;
 }
Esempio n. 6
0
 private void Awake()
 {
     playerInput = GameManager.Instance.InputController.State;
 }