Ejemplo n.º 1
0
    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 ();
        }
    }
Ejemplo n.º 2
0
    public void ExecuteInvestigation()
    {
        InvestigationManager im = InvestigationManager.GetInstance();
        int investigationPrice  = im.getInvestigation(selectedId).getCost();

        UserDataManager.GetInstance().gold.espendGold(investigationPrice);
        im.startInvestigation(selectedId);
        UpdateInvestigationList(true);
        updateAvailableInfo();
        //UpdateinvestigationList (); //--
        //updatePageInfo (); //--
    }
Ejemplo n.º 3
0
    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");
        }
    }