Exemple #1
0
 public static void Draw()
 {
     for (int i = 0; i < _textIterator; i++)
     {
         try
         {
             Functions_Draw.Draw(_messages[i].Text, Assets.GetFont("Test"), pos);
         }
         catch
         {
             Functions_Draw.Draw("Error", Assets.GetFont("Test"), pos);
         }
         pos.Y += 25;
     }
     Reset();
 }
        public override Screen HandleInput(GameTime gameTime)
        {
            if (InputReader.IsKeyTriggered(Keys.Escape))
            {
                OpenMenuScreen();
            }
            if (InputReader.IsKeyTriggered(Keys.F1))
            {
                ToggleAllDebug();
            }
            if (InputReader.IsKeyTriggered(Keys.F2))
            {
                Flags.ShowDrawRecs = !Flags.ShowDrawRecs;
            }
            if (InputReader.IsKeyTriggered(Keys.F3))
            {
                Flags.ShowCollisionRecs = !Flags.ShowCollisionRecs;
            }
            if (InputReader.IsKeyTriggered(Keys.F4))
            {
                Flags.ShowDebuggingText = !Flags.ShowDebuggingText;
            }
            if (InputReader.IsKeyTriggered(Keys.F5))
            {
                Flags.ShowMovementCenters = !Flags.ShowMovementCenters;
            }
            if (InputReader.IsKeyPressed(Keys.F10))
            {
                Functions_Draw.Draw("Error", Assets.GetFont("Test"), new Vector2(100, 100));
            }

            /* if (InputReader.IsKeyTriggered(Keys.N)) //TODO Create GenerationTesterScreen to test generation lmao
             * {
             *  _levelGenerator.ApplySimpleCellularAutomata(_currentLevel);
             *  _ecs.PurgeForNextLevel();
             *  _ecs.ProcessLevel(_currentLevel, _currentLevelTracker);
             * }
             */
            SimpleCameraMovement(gameTime);

            return(this);
        }