示例#1
0
        public void Update(GameTime gameTime)
        {
            _mouseState = Mouse.GetState();

            foreach (int entityId in ActiveEntities)
            {
                var transform2D = _transform2DMapper.Get(entityId);
                var guiStyle    = _guiStyleMapper.Get(entityId);

                if (InteractionHelper.IsEntityHovered(transform2D, _mouseState))
                {
                    guiStyle.State = GUIState.HOVER;
                }
                else
                {
                    guiStyle.State = GUIState.DEFAULT;
                }
            }
        }