Esempio n. 1
0
    //读取故事文件
    public ChatManager.ChatActionBox LoadStory(string path, ChatManager.ChatConfig config)
    {
        ChatManager.ChatActionBox storylist = new ChatManager.ChatActionBox();

#if _storyDebug
        ResourcesLoader resourcesLoader = new ResourcesLoader();
        string[]        txt             = resourcesLoader.LoadStoryConfig("Config/" + config.Languege + "/" + path + ".txt");
#else
        TxtTool  tt  = new TxtTool();
        string[] txt = tt.ReadFile(config.Languege, path);
#endif

        storylist = ParseActionList(txt, config);

        //初始化index
        storylist.NowIndex = 0;

        return(storylist);
    }