Ejemplo n.º 1
0
    // Use this for initialization
    void Start()
    {
        foreach (TextAsset t in Resources.LoadAll <TextAsset>("Story/" + storyChapter))
        {
            StoryContent s = StoryContent.CreateFromJSON(t.text);
            storyContentList.Add(s);
        }

        for (int i = 0; i < storyContentList.Count; i++)
        {
            if (storyContentList[i].title.Equals(story))
            {
                n = i;
                break;
            }
        }

        foreach (TextAsset t in Resources.LoadAll <TextAsset>("Achievement/" + achiChapter))
        {
            AchievementContent a = AchievementContent.CreateFromJSON(t.text);
            achiContentList.Add(a);
        }

        if (!hideStory)
        {
            StartCoroutine("ShowContent");
        }
        else
        {
            if (Menu.instance != null)
            {
                storyPanel.transform.parent.gameObject.SetActive(false);
                Menu.instance.isGameOn = true;
            }
        }
    }