protected override void OnInput(MapInputPayload payload) { OnSelectionInput(payload.SelectionAxes); OnCameraInput(payload.CameraAxes); if (payload.SubmitButton) { OnSubmit(); } if (payload.CancelButton) { OnCancel(); } }
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); }
protected abstract void OnInput(MapInputPayload payload);