Beispiel #1
0
        private void Game1_Paint(Control sendred, TickEventArgs e)
        {
            // Form Paint
            Graphics graphics = e.Graphics;

            _fps.Draw(graphics, e.GameTime);

            if (!_isDrawing) return;
            graphics.DrawRectangle(new Rectangle(50, 50, 200, 200), Color.Red, 3f);
            graphics.DrawString(_baseFont, _keyPresedsDraw, new Vector2(70, 70), Color.Lime);
        }
Beispiel #2
0
 private void LoadingScreen_Paint(Control sendred, TickEventArgs e)
 {
     if (BackGroundThread.IsEnd) return;
     e.Graphics.DrawString(_baseFont,
         BaseString + (_thisType == 1 ? "." : _thisType == 2 ? ".." : _thisType == 3 ? "..." : ""),
         _center, Color.Lime, 0f, Vector2.Zero, 2f, SpriteEffects.None, 0.09f);
     e.Graphics.FillRectangle(new Rectangle(0, 0, Window.Screen.X, Window.Screen.Y), new Color(64, 64, 64, 64));
 }
Beispiel #3
0
        private void Game1_Invalidate(Control sendred, TickEventArgs e)
        {
            GameTime gameTime = e.GameTime;
            _fps.Update(gameTime);

            // Form Update
            // xna Method: Update
            string tmp = PKInputManager.GetInstance.KeyboardState.GetPressedKeys().Aggregate("You Key Down: ",
                (current, key) => current + (key + Separator));
            tmp = tmp.TrimEnd(Separator);

            if (tmp == string.Empty) tmp = "hi! I showed downed keys";

            _keyPresedsDraw = tmp;
        }
Beispiel #4
0
 private void LoadingScreen_Invalidate(Control sendred, TickEventArgs e)
 {
     if (!BackGroundThread.IsEnd)
     {
         _allTime += (float)e.GameTime.ElapsedGameTime.TotalSeconds;
         if (!(_allTime >= AnimChange)) return;
         _allTime = 0f;
         _thisType = _thisType + 1 >= 3 ? 0 : _thisType + 1;
     }
     else
     {
         BackGroundThread.Stop();
         Change(NextState);
     }
 }