Ejemplo n.º 1
0
        public void CopyTo(InputVariables other, bool reset = true)
        {
            if (reset)
            {
                other.Reset(false);
            }

            other.mouseWheel    = mouseWheel;
            other.mousePosition = mousePosition;
            other.inputString   = inputString;

            foreach (var pair in pressedKeys)
            {
                other.pressedKeys.Add(pair.Key, pair.Value);
            }

            foreach (string str in pressedButtons)
            {
                other.pressedButtons.Add(str);
            }

            for (int i = 0; i < InputEngine.MaxMouseButtons; i++)
            {
                other.mouseButtons[i] = mouseButtons[i];
            }
        }
Ejemplo n.º 2
0
        protected override void Init()
        {
            Game.TryGetModule(out windowing);

            fixedInput      = new InputVariables();
            renderInput     = new InputVariables();
            prevFixedInput  = new InputVariables();
            prevRenderInput = new InputVariables();

            InitSignals();
            InitTriggers();
            InitCallbacks();

            SingletonInputTrigger.StaticInit();
        }