示例#1
0
 /// <summary>
 /// Create boosterholder, if not created
 /// </summary>
 /// <param name="goSet"></param>
 public void CreateBoosterHolder(GameObjectsSet goSet)
 {
     if (BoostHolder == null)
     {
         BoostHolder = new BoostersHolder(goSet, SaveData, savePrefix);
     }
 }
        private void CreateBoostersPanel()
        {
            FooterBoosterHelper[] fBH = BoostersParent.GetComponentsInChildren <FooterBoosterHelper>();
            foreach (FooterBoosterHelper item in fBH)
            {
                DestroyImmediate(item.gameObject);
            }
            BoostersHolder bHolder = BubblesPlayer.Instance.BoostHolder;

            foreach (var item in bHolder.Boosters)
            {
                item.CreateFooterBooster(BoostersParent, footerBoosterPrefab, () =>
                {
                    int id = item.bData.ID;
                    InGamePurchaser iGP    = InGamePurchaser.Instance;
                    ShopThingDataInGame sd = iGP.GetProductById(id.ToString());
                    if (BubblesGuiController.Instance)
                    {
                        switch (sd.shopType)
                        {
                        case InGameShopType.None:
                            break;

                        case InGameShopType.BoosterMulticolor:
                            BubblesGuiController.Instance.ShowBoosterMulticolorShop();
                            break;

                        case InGameShopType.BoosterFireBall:
                            BubblesGuiController.Instance.ShowBoosterFireBallShop();
                            break;

                        case InGameShopType.BoosterEyeBall:
                            BubblesGuiController.Instance.ShowBoosterEyeBallShop();
                            break;

                        default:
                            break;
                        }
                    }
                });
            }
        }
示例#3
0
        private void Start()
        {
            #region game sets
            if (!gcSet)
            {
                Debug.Log("Game construct set not found!!!");
                return;
            }

            if (!LcSet)
            {
                Debug.Log("Level construct set not found!!! - " + CurrentLevel);
                return;
            }

            if (!MatchSet)
            {
                Debug.Log("MatcSet not found!!! - " + CurrentLevel);
                return;
            }
            #endregion game sets

            levelsStars = new List <int>();
            levelScores = new List <int>();

            LoadCoins();
            LoadLife();
            LoadPassedLevel();
            LoadHardMode();
            LoadFullName();
            // load saved data
            if (SaveData)
            {
                levelScores = GetPassedLevelsScores();
                levelsStars = GetPassedLevelsStars();
            }

            SetScore(0);
            BoostHolder = new BoostersHolder(MatchSet, SaveData, savePrefix);
        }