private void OpenGoldPackage(object sender, EventArgs e) { TumDialoglariSifirla(); StoreGoldPackage1 = new StoreGold(); StoreGoldPackage1.PrivateProfileBaseActivity1 = this; StoreGoldPackage1.Show(this.SupportFragmentManager, "StoreGoldPackage1"); }
void TumDialoglariSifirla() { StoreGoldPackage1 = null; StoreSuperBoost1 = null; StoreBoost1 = null; StoreKrediYukle1 = null; }
protected virtual void CreateComponent() { GameObject progressBarBehaviorGo = Resources.Load(PROGRESS_PREFAB_NAME, typeof(GameObject)) as GameObject; m_ProgressBarBehaviorDictionary.Add(4, (Instantiate(progressBarBehaviorGo) as GameObject).GetComponent <ProgressBarBehavior>()); #region Store if (this.BuildingConfigData.CanStoreGold) { StoreGold storeGold = this.gameObject.AddComponent <StoreGold>(); storeGold.BuildingLogicData = this.BuildingLogicData; storeGold.BuildingBehavior = this.BuildingBehavior; } if (this.BuildingConfigData.CanStoreOil) { StoreOil storeOil = this.gameObject.AddComponent <StoreOil>(); storeOil.BuildingLogicData = this.BuildingLogicData; storeOil.BuildingBehavior = this.BuildingBehavior; } if (this.BuildingConfigData.CanStoreFood) { StoreFood storeFood = this.gameObject.AddComponent <StoreFood>(); storeFood.BuildingLogicData = this.BuildingLogicData; storeFood.BuildingBehavior = this.BuildingBehavior; } if (this.BuildingConfigData.CanStoreItem) { StoreItem storeItem = this.gameObject.AddComponent <StoreItem>(); storeItem.BuildingLogicData = this.BuildingLogicData; storeItem.BuildingBehavior = this.BuildingBehavior; } #endregion #region Collection if (this.BuildingConfigData.CanProduceFood) { CollectFood collectFood = this.gameObject.AddComponent <CollectFood>(); collectFood.BuildingLogicData = this.BuildingLogicData; collectFood.BuildingBehavior = this.BuildingBehavior; } if (this.BuildingConfigData.CanProduceGold) { CollectGold collectGold = this.gameObject.AddComponent <CollectGold>(); collectGold.BuildingLogicData = this.BuildingLogicData; collectGold.BuildingBehavior = this.BuildingBehavior; } if (this.BuildingConfigData.CanProduceOil) { CollectOil collectOil = this.gameObject.AddComponent <CollectOil>(); collectOil.BuildingLogicData = this.BuildingLogicData; collectOil.BuildingBehavior = this.BuildingBehavior; } #endregion #region Produce if (this.BuildingConfigData.CanProduceArmy) { ProduceArmy produceArmy = this.gameObject.AddComponent <ProduceArmy>(); produceArmy.BuildingLogicData = this.BuildingLogicData; m_ProgressBarBehaviorDictionary.Add(3, (Instantiate(progressBarBehaviorGo) as GameObject).GetComponent <ProgressBarBehavior>()); produceArmy.BuildingBehavior = this.BuildingBehavior; } if (this.BuildingConfigData.CanProduceItem) { ProduceItem produceItem = this.gameObject.AddComponent <ProduceItem>(); produceItem.BuildingLogicData = this.BuildingLogicData; m_ProgressBarBehaviorDictionary.Add(1, (Instantiate(progressBarBehaviorGo) as GameObject).GetComponent <ProgressBarBehavior>()); produceItem.BuildingBehavior = this.BuildingBehavior; } #endregion #region Upgrade if (this.BuildingConfigData.CanUpgradeArmy) { UpgradeArmy upgradeArmy = this.gameObject.AddComponent <UpgradeArmy>(); upgradeArmy.BuildingLogicObject = this.BuildingLogicData; m_ProgressBarBehaviorDictionary.Add(2, (Instantiate(progressBarBehaviorGo) as GameObject).GetComponent <ProgressBarBehavior>()); upgradeArmy.BuildingBehavior = this.BuildingBehavior; } if (this.BuildingConfigData.CanUpgradeItem) { UpgradeItem upgradeItem = this.gameObject.AddComponent <UpgradeItem>(); upgradeItem.BuildingLogicObject = this.BuildingLogicData; m_ProgressBarBehaviorDictionary.Add(0, (Instantiate(progressBarBehaviorGo) as GameObject).GetComponent <ProgressBarBehavior>()); upgradeItem.BuildingBehavior = this.BuildingBehavior; } #endregion }