private void updateSelectedMilestone() { string milestoneDescription = ""; string currentBonus = ""; string nextBonus = ""; CoopManager coopMan = CoopManager.GetInstance(); switch (m_selectedMilestone) { case MilestoneType.EXPANSION: if (!coopMan.expansionBonusIsInMaxLvl()) { milestoneDescription = Dictionary.getString("CURRENTLY_YOU_HAVE") + " " + WorldTerrain.GetInstance().getNumberOfChunks() + " " + Dictionary.getString("OF") + " " + CoopManager.GetInstance().getNextExpansionGoal() + " " + Dictionary.getString("FIELDS_CURRENT_GOAL"); } else { milestoneDescription = Dictionary.getString("MAX_BONUS"); } currentBonus = Dictionary.getString("CURRENT_BONUS") + ": " + coopMan.getCurrentExpansionBonus() + Dictionary.getString("OBJECT_DISCOUNT"); if (!coopMan.expansionBonusIsInMaxLvl()) { nextBonus = Dictionary.getString("NEXT_BONUS") + ": " + coopMan.getNextExpansionBonus() + Dictionary.getString("OBJECT_DISCOUNT"); } break; case MilestoneType.ECOLOGY: if (!Tutorial_Ecology.init) { TutorialManager tutMan = GameObject.FindGameObjectWithTag("Tutorial").GetComponent <TutorialManager> (); tutMan.startTuto(new Tutorial_Ecology()); } if (!coopMan.ecologyBonusIsInMaxLvl()) { milestoneDescription = Dictionary.getString("YOU_HAVE") + " " + coopMan.getLastYearEcologyScore() + " " + Dictionary.getString("ECOLOGY_MILESTONE_DESC"); } else { milestoneDescription = Dictionary.getString("MAX_BONUS"); } currentBonus = Dictionary.getString("CURRENT_BONUS") + ": " + coopMan.getCurrentEcologyBonus() + " " + Dictionary.getString("COINS_PER_YEAR"); if (!coopMan.ecologyBonusIsInMaxLvl()) { nextBonus = Dictionary.getString("NEXT_BONUS") + ": " + coopMan.getNextEcologyBonus() + " " + Dictionary.getString("COINS_PER_YEAR"); } break; case MilestoneType.PRODUCTION: if (!coopMan.totalProductionBonusIsInMaxLvl()) { milestoneDescription = Dictionary.getString("PRODUCTION_MILESTONE_DESC_1") + " " + UserDataManager.GetInstance().getTotalRiceProduced() / 1000.0f + " " + Dictionary.getString("PRODUCTION_MILESTONE_DESC_2") + " " + coopMan.getNextTotalProductionGoal() + " t."; } else { milestoneDescription = Dictionary.getString("MAX_BONUS"); } currentBonus = Dictionary.getString("CURRENT_BONUS") + ": " + coopMan.getCurrentTotalProductionBonus() + Dictionary.getString("COINS_AUGMENTED"); if (!coopMan.totalProductionBonusIsInMaxLvl()) { nextBonus = Dictionary.getString("NEXT_BONUS") + ": " + coopMan.getNextTotalProductionBonus() + Dictionary.getString("COINS_AUGMENTED"); } break; case MilestoneType.ANUAL_PRODUCTION: if (!coopMan.anualProductionBonusIsInMaxLvl()) { milestoneDescription = Dictionary.getString("ANUAL_PRODUCTION_MILESTONE_DESC_1") + " " + coopMan.getLastYearProduction() / 1000.0f + " " + Dictionary.getString("ANUAL_PRODUCTION_MILESTONE_DESC_2") + " " + coopMan.getNextAnualProductionGoal() + " t."; } else { milestoneDescription = Dictionary.getString("MAX_BONUS"); } MyUtils.Pair.Pair <int, int> currentAnualProductionBonus = coopMan.getCurrentAnualProductionBonus(); currentBonus = Dictionary.getString("CURRENT_BONUS") + ": " + currentAnualProductionBonus.First + Dictionary.getString("ANUAL_PRODUCTION_BONUS_1") + " " + currentAnualProductionBonus.Second + Dictionary.getString("ANUAL_PRODUCTION_BONUS_2"); MyUtils.Pair.Pair <int, int> nextAnualProductionBonus = coopMan.getNextAnualProductionBonus(); if (!coopMan.anualProductionBonusIsInMaxLvl()) { nextBonus = Dictionary.getString("NEXT_BONUS") + ": " + nextAnualProductionBonus.First + Dictionary.getString("ANUAL_PRODUCTION_BONUS_1") + " " + nextAnualProductionBonus.Second + Dictionary.getString("ANUAL_PRODUCTION_BONUS_2"); } break; } m_itemDescriptionText.text = milestoneDescription; m_currentItemBonusText.text = currentBonus; m_nextItemBonusText.text = nextBonus; for (int i = 0; i < (int)MilestoneType.NUMBER_MILESTONES; ++i) { m_coopPanels[i].GetComponent <Image>().enabled = false; } m_coopPanels[(int)m_selectedMilestone].GetComponent <Image>().enabled = true; }