void updateAvailableInfo() { InvestigationManager im = InvestigationManager.GetInstance(); List <Investigation> investigations = im.getAvailableInvestigations(); if (investigations.Count == 0) { investigationButton.interactable = false; investigationButtonText.text = Dictionary.getString("ALL_RESEARCHED"); nameText.text = ""; priceText.text = ""; descriptionText.text = ""; } else { Investigation selectedInvest = im.getInvestigation(selectedId); nameText.text = selectedInvest.getName(); priceText.text = " " + Dictionary.getString("COST") + " " + selectedInvest.getCost(); descriptionText.text = selectedInvest.getDesc(); investigationButton.interactable = true; investigationButtonText.text = Dictionary.getString("RESEARCH"); //selectedInvest.printInfo (); } }
void updateProgressInfo() { InvestigationManager im = InvestigationManager.GetInstance(); List <Investigation> investigations = im.getProgressInvestigations(); if (investigations.Count == 0) { investigationButton.interactable = false; investigationButtonText.text = Dictionary.getString("NOTHING_UNDER_RESEARCH"); nameText.text = ""; priceText.text = ""; descriptionText.text = ""; } else { Investigation selectedInvest = im.getInvestigation(selectedId); nameText.text = selectedInvest.getName(); priceText.text = " " + Dictionary.getString("COST") + " " + selectedInvest.getCost(); descriptionText.text = selectedInvest.getDesc(); investigationButton.interactable = false; investigationButtonText.text = Dictionary.getString("RESEARCH_UNDERWAY"); } }
public void newYear() { // Se dan por investigadas las que se estaban investigando foreach (Investigation i in m_invest.Values) { if (i.isInvestigating()) { m_invest[i.getID()].setInvestigating(false); m_invest[i.getID()].setPurchased(true); doInvestigatedEffect(i.getID()); } } // Se crean carteles para nuevas invs disponibles List <Investigation> availableInvs = getAvailableInvestigations(); TimeManager tm = GameObject.Find("Logic").GetComponent <TimeManager>(); for (int i = availableInvs.Count - 1; i >= 0; --i) { Investigation currentInv = availableInvs [i]; if (currentInv.getYear() == tm.getCurrentYear()) { GameObject panelTemplate = Resources.Load("Prefabs/InvestigationUnlockedFocusLayer") as GameObject; GameObject panelInstance = GameObject.Instantiate(panelTemplate); GameObject panel = panelInstance.transform.FindChild("InvestigationUnlockedPanel").gameObject; string text = Dictionary.getString("INVESTIGATION_UNLOCKED") + " " + currentInv.getName(); panel.GetComponent <InvestigationUnlockedPanel> ().ChangeText(text); } } }