예제 #1
0
        internal void UpdateRightStickWithValue(Vector2 value, ulong updateTick, float deltaTime)
        {
            RightStickLeft.UpdateWithValue(Mathf.Max(0.0f, -value.x), updateTick, deltaTime);
            RightStickRight.UpdateWithValue(Mathf.Max(0.0f, value.x), updateTick, deltaTime);

            if (InputManager.InvertYAxis)
            {
                RightStickUp.UpdateWithValue(Mathf.Max(0.0f, -value.y), updateTick, deltaTime);
                RightStickDown.UpdateWithValue(Mathf.Max(0.0f, value.y), updateTick, deltaTime);
            }
            else
            {
                RightStickUp.UpdateWithValue(Mathf.Max(0.0f, value.y), updateTick, deltaTime);
                RightStickDown.UpdateWithValue(Mathf.Max(0.0f, -value.y), updateTick, deltaTime);
            }
        }
예제 #2
0
        internal void UpdateRightStickWithValue(Vector2 value)
        {
            RightStickLeft.UpdateWithValue(Math.Max(0.0f, -value.X));
            RightStickRight.UpdateWithValue(Math.Max(0.0f, value.Y));

            if (InputManager.InvertYAxis)
            {
                RightStickUp.UpdateWithValue(Math.Max(0.0f, -value.Y));
                RightStickDown.UpdateWithValue(Math.Max(0.0f, value.Y));
            }
            else
            {
                RightStickUp.UpdateWithValue(Math.Max(0.0f, value.Y));
                RightStickDown.UpdateWithValue(Math.Max(0.0f, -value.Y));
            }
        }