void Move() { if (playerInput == null) { playerInput = GameManager.Instance.InputController.State; if (playerInput == null) { return; } } Move(playerInput.Horizontal, playerInput.Vertical); }
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; }
public void SetInputController(InputController.InputState state) { playerInput = state; }
private void Awake() { playerInput = GameManager.Instance.InputController.State; }