public static BubbleMatrixManager GetInstance(int rows, int columns, BubbleMatrixGeoInfo geoInfo, Difficulty difficulty) { if (_instance == null) { var matrix = new BubbleMatrix(rows, columns); _instance = new BubbleMatrixManager(matrix, geoInfo, difficulty); } return(_instance); }
public void Initialize(Difficulty difficulty) { _geoInfo = new BubbleMatrixGeoInfo(_leftBorder, _rightBorder, _topBorder, _rows, _columns, _bubbleRadius); _gameManager = BubbleMatrixManager.GetInstance(_rows, _columns, _geoInfo, difficulty); _currentBubble = _CreateBubble(_currentBubbleRoot, CURRENT_BUBBLE_SCALE, false); _nextBubble = _CreateBubble(_nextBubbleRoot, NEXT_BUBBLE_SCALE, false); for (int i = 0; i < 4; ++i) { AddNewRowToMatrix(); } }