コード例 #1
0
ファイル: PreviewPanel.cs プロジェクト: kavengagne/TetrisGame
 public PreviewPanel(Board board, Rectangle bounds, Color backgroundColor)
 {
     _board = board;
     Bounds = bounds;
     _backgroundColor = backgroundColor;
     _texture = CreateTexture(TetrisGame.GetInstance().GraphicsDevice, bounds, backgroundColor);
 }
コード例 #2
0
ファイル: ScoreBoard.cs プロジェクト: kavengagne/TetrisGame
 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;
 }
コード例 #3
0
        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();
        }