Ejemplo n.º 1
0
    public void SetObject(ClueData clue, bool full = true)
    {
        CaseData openedCase = InvestigationManager.GetCase();

        GetComponent <CanvasGroup>().alpha = 1;
        string fullDescription = clue.clueDescription;
        Files  files           = Files.Load();

        if (full)
        {
            int clueIndex = openedCase.GetClueIndexFromData(clue);
            fullDescription += "\n\nTESTEMUNHOS:";
            foreach (Testimony t in files.GetCaseStatus().testimonys)
            {
                if (t.clue == clueIndex)
                {
                    TestimonyData td = openedCase.GetTestimonyData(t);
                    fullDescription += "\n" + "* " + td.witness.witnessName + ": " + td.description;
                }
            }
            fullDescription += "\n\nINSIGHTS:";
            foreach (int i in files.GetCaseStatus().insights)
            {
                InsightData id = openedCase.GetInsightData(i);
                if ((openedCase.GetClueIndexFromData(id.firstClue) == clueIndex) ||
                    (openedCase.GetClueIndexFromData(id.secondClue) == clueIndex))
                {
                    fullDescription += "\n* [" + id.firstClue.clueName + ":" + id.secondClue.clueName + "]"
                                       + id.description;
                }
            }
        }
        description.text = fullDescription;
        title.text       = clue.clueName;
        icon.sprite      = clue.img;
    }