示例#1
0
        protected override void OnInput(MapInputPayload payload)
        {
            OnSelectionInput(payload.SelectionAxes);
            OnCameraInput(payload.CameraAxes);

            if (payload.SubmitButton)
            {
                OnSubmit();
            }
            if (payload.CancelButton)
            {
                OnCancel();
            }
        }
示例#2
0
        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);