private void CreateFallingPiece() { _piece = new PieceEntity(_pieceRenderer, _boardRenderer, _nextPiece); AddEntity(_piece); _nextPiece = PieceTemplate.GetRandomPiece(); _fallInterval.Start(); }
public override void Enter() { _board = new BoardEntity(_boardRenderer); AddEntity(_board); _piece = new PieceEntity(_pieceRenderer, _boardRenderer, PieceTemplate.GetRandomPiece()); AddEntity(_piece); _nextPiece = PieceTemplate.GetRandomPiece(); _fallInterval.Start(); InputManager.Instance.BindAction(Keys.Left, MovePieceLeft); InputManager.Instance.BindAction(Keys.Right, MovePieceRight); InputManager.Instance.BindAction(Keys.Down, MovePieceGround); InputManager.Instance.BindAction(Keys.Space, RotatePiece); }