Esempio n. 1
0
        public void Update(InputState inputState)
        {
            mouseInside = frame.Contains(inputState.MousePos);
            if(mouseInside && inputState.WasMouseLeftJustPressed())
            {
                pressedInside = true;
            }

            if (!inputState.mouseLeft.pressed)
            {
                if(mouseInside && pressedInside)
                {
                    onPress();
                }
                pressedInside = false;
            }
        }
 public void Add(InputState value)
 {
     states.Add(value.keyboard);
 }