public void ApplyShootBubbleToGrid(GridCell hitGridCell, GridCell freeGridCell, CellsGroup shootGridCellsArea) { if (debug) { Debug.Log("apply shoot bubble"); } if (MData != null) // regular object shoot bubble, set new mainobject and destroy shootbubble { if (shootGridCellsArea.Length < 2) { BubbleGrid.Instance.SetMainObject(freeGridCell, MData); } DestroyImmediate(gameObject); } else // possible booster { BoosterFunc bF = GetComponent <BoosterFunc>(); if (bF) { bF.ApplyBooster(hitGridCell, freeGridCell, shootGridCellsArea); } } if (hitGridCell) { hitGridCell.ShootHit(null); } }