示例#1
0
        private void SetHorizontalAxis(float value)
        {
            if (value > -m_deadZone.x && value < m_deadZone.x)
            {
                value = 0.0f;
            }

            var binding = m_horizontalAxisBinding.Get();

            binding.SetRemoteAxisValue(value);
        }
示例#2
0
        private void SetVerticalAxis(float value)
        {
            if (value > -m_deadZone.y && value < m_deadZone.y)
            {
                value = 0.0f;
            }

            var binding = m_verticalAxisBinding.Get();

            binding.SetRemoteAxisValue(value);
        }
        private void OnRemoteInputUpdate(PlayerID playerID)
        {
            if (playerID == PlayerID.One)
            {
                InputBinding inputBinding = m_buttonBinding.Get();
                inputBinding.SetRemoteButtonState(m_buttonState);
            }

            if (m_buttonState == ButtonState.JustPressed)
            {
                m_buttonState = ButtonState.Pressed;
            }

            if (m_buttonState == ButtonState.JustReleased)
            {
                m_buttonState = ButtonState.Released;
            }
        }
        private void SetVerticalAxis(float value)
        {
            var binding = m_verticalAxisBinding.Get();

            binding.SetRemoteAxisValue(value);
        }
        private void SetHorizontalAxis(float value)
        {
            var binding = m_horizontalAxisBinding.Get();

            binding.SetRemoteAxisValue(value);
        }