private void Display(NarrativeElement element)
    {
        Debug.Log("Displaying relevant narrative element");
        PopupTextManager clone = Instantiate(GizmoPrefab, GameObject.FindGameObjectWithTag("MainCamera").transform).GetComponentInChildren <PopupTextManager>();

        clone.PopupTexts = element.Texts;
        clone.Init();
        clone.DoEnterAnimation();
    }
    public bool TryFindNarrativeWithKey(string key, out NarrativeElement e)
    {
        if (NarrativeElementDictionary.TryGetValue(key, out e))
        {
            return(true);
        }

        Debug.Log("Couldn't find a narrative element matching key \"" + key + "\".");
        return(false);
    }
    public bool Unlock(NarrativeElement e)
    {
        Debug.Log("This narrative is unlocked " + e.Unlocked + ". If true, this returned false");
        if (e.Unlocked)
        {
            return(false);
        }

        e.Unlocked = true;
        Display(e);

        SaveRead();

        return(true);
    }
示例#4
0
 private static bool DoRead(NarrativeElement e)
 {
     return(narrativeDB.Unlock(e));
 }