예제 #1
0
파일: Game.cs 프로젝트: Qub1/Tetris
        public Game()
        {
            Graphics = new GraphicsDeviceManager(this);
            Content.RootDirectory = "Content";

            IsMouseVisible = true;

            InputHandler = new InputHandler(this);
            AssetManager = new AssetManager(Content);
        }
예제 #2
0
파일: Entity.cs 프로젝트: Qub1/Tetris
 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);
        }