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