Esempio n. 1
0
        public TetrisGrid(ContentManager content)
        {
            levelGrid = new Color[Width, Height];
            gridBlockTex = content.Load<Texture2D>("Block");
            emptyBlockTex = content.Load<Texture2D>("EmptyBlock");

            position = Vector2.Zero;
            blockPosition = new Vector2(2, 2);
            timeToMove = 0.25d;

            activeBlock = RandomBlock();
            Reset();
        }
Esempio n. 2
0
 public void ResetActiveBlock()
 {
     activeBlock = nextBlock;
     nextBlock = RandomBlock();
     blockPosition.Y = 0;
     blockPosition.X = Width/2-2;
 }