Пример #1
0
        public Game()
        {
            Graphics = new GraphicsDeviceManager(this);
            Content.RootDirectory = "Content";

            IsMouseVisible = true;

            InputHandler = new InputHandler(this);
            AssetManager = new AssetManager(Content);
        }
Пример #2
0
 public virtual void HandleInput(InputHandler inputHandler)
 {
 }
Пример #3
0
        //handles any initialization to be done before main game loop
        protected override void Initialize()
        {
            //screen initialization
            graphics.PreferredBackBufferWidth = screenWidth;
            graphics.PreferredBackBufferHeight = screenHeight;
            graphics.ApplyChanges();
            IsMouseVisible = true;

            //game component initialization
            Components.Add(inputHandler = new InputHandler(this));

            base.Initialize();

            //game object initialization
            blockFactory = new BlockFactory(squareTex, origin);
            blockList = new List<TetBlock>();
            tetBoard = new TetBoard(gridUnit);
        }