Esempio n. 1
0
 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);
 }
Esempio n. 2
0
        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();
            }
        }
Esempio n. 3
0
 private BubbleMatrixManager(BubbleMatrix matrix, BubbleMatrixGeoInfo geoInfo, Difficulty difficulty)
 {
     _matrix    = matrix;
     _geoInfo   = geoInfo;
     _diffculty = difficulty;
 }