public PreviewPanel(Board board, Rectangle bounds, Color backgroundColor) { _board = board; Bounds = bounds; _backgroundColor = backgroundColor; _texture = CreateTexture(TetrisGame.GetInstance().GraphicsDevice, bounds, backgroundColor); }
public ScoreBoard(Board board, Rectangle bounds, Color backgroundColor) { _board = board; _bounds = bounds; _backgroundColor = backgroundColor; _texture = CreateTexture(TetrisGame.GetInstance().GraphicsDevice, bounds, backgroundColor); _font = TetrisGame.GetInstance().Content.Load<SpriteFont>("Fonts/ScoreBoard"); _score = new Score(); _score.LinesUpdated += TetrisGame.GetInstance().ChangeBackgroundColor; }
public override void LoadContent() { if (_content == null) { _content = new ContentManager(ScreenManager.Game.Services, "Content"); } Board = new Board(); InputManager = new InputManager(); RegisterUserInputs(); // TODO: KG - Remove this when game completed. // Simulate loading time to show Loading Screen. Thread.Sleep(3000); // Tell the Game that we have just finished a very // long frame, and that it should not try to catch up. ScreenManager.Game.ResetElapsedTime(); }