Esempio n. 1
0
        protected override void OnUpdate(GameTime gameTime)
        {
            base.OnUpdate(gameTime);

            if (_isPending)
            {
                var dt = gameTime.TotalGameTime.TotalSeconds;

                _animationFrame = (int)((dt * 5) % _connectingStates.Length);
            }
            else
            {
                var mouseState = Mouse.GetState();

                _cursorPosition = GuiRenderer.Unproject(new Vector2(mouseState.X, mouseState.Y)).ToPoint();
                if (RenderBounds.Contains(_cursorPosition))
                {
                    _renderLatency = true;
                }
                else
                {
                    _renderLatency = false;
                }
            }
        }