public void UpdateTouchValue(float touchInputValue) { InputValue.value = touchInputValue; if (!IsInputButtonHold) { OnInputUpdate?.Invoke(true); IsInputButtonHold = true; } }
public void ResetInputValue(float defaultValue = 0) { if (InputSlider) { InputSlider.value = defaultValue; } InputValue.value = defaultValue; IsInputButtonHold = false; OnInputUpdate?.Invoke(false); }
public void UpdateSliderValue() { if (InputSlider) { InputValue.value = InputSlider.value; } if (!IsInputButtonHold) { OnInputUpdate?.Invoke(true); IsInputButtonHold = true; } }
private void Update() { var rawNavInput = _selectionAxes.GetInput(); var selectionAxes = ProcessNavInput(rawNavInput); var cameraAxes = _cameraAxes.GetInput(); var submitInput = _submitButton.GetButtonDown(); var cancelInput = _cancelButton.GetButtonDown(); if (_usingMouseInput) { cameraAxes += _mouseCameraInput.GetInput(); } _prevNavInput = rawNavInput; // Send payload var payload = new MapInputPayload(selectionAxes, cameraAxes, submitInput, cancelInput); OnInputUpdate?.Invoke(payload); }
private void OnInputTick() { if (Input.GetKey(KeyCode.LeftControl)) { return; } if (Input.GetMouseButton(0)) { var cell = GetCellFromMousePos(); Fill(cell, editRadius); OnInputUpdate?.Invoke(); } if (Input.GetMouseButton(1)) { var cell = GetCellFromMousePos(); Fill(cell, editRadius, 0); OnInputUpdate?.Invoke(); } }
private void SliderListener(int index, float value) { OnInputUpdate?.Invoke(index, value); }