Esempio n. 1
0
        /// <summary>
        /// 加载事件数据
        /// </summary>
        /// <param name="data"></param>
        public static void LoadAdditionalChoicesData(string data)
        {
            List <AdditionalChoices> Temp = new List <AdditionalChoices>();

            if (data[0] == '-')
            {
                Temp = ManagedGameObjectIO.Load <List <AdditionalChoices> >(data);
                foreach (var e in Temp)
                {
                    AddChoices(e);
                }
            }
            else
            {
                AddChoices(ManagedGameObjectIO.Load <AdditionalChoices>(data));
            }
        }
Esempio n. 2
0
        /// <summary>
        /// 加载事件数据
        /// </summary>
        /// <param name="data"></param>
        public static void LoadEventData(string data)
        {
            List <Event> Temp = new List <Event>();

            if (data[0] == '-')
            {
                Temp = ManagedGameObjectIO.Load <List <Event> >(data);
                foreach (var e in Temp)
                {
                    AddEvent(e);
                }
            }
            else
            {
                AddEvent(ManagedGameObjectIO.Load <Event>(data));
            }
        }
Esempio n. 3
0
        /// <summary>
        /// 添加事件
        /// </summary>
        public static void AddEvent()
        {
            RuntimeConfig.EventData.Add("Debug", new Dictionary <int, Event>());

            var i      = File.OpenText(@"E:\SteamLibrary\steamapps\common\The Scroll Of Taiwu\BepInEx\plugins\0.YanCore\x.yaml");
            var events = ManagedGameObjectIO.Load <List <Event> >(i.ReadToEnd());

            foreach (var @event in events)
            {
                YanLib.Logger.LogInfo(@event.ID);
                var id = @event.ID.Split(new char[] { '.' }, 2);
                foreach (var t in id)
                {
                    YanLib.Logger.LogInfo(t);
                }
                RuntimeConfig.EventData[id[0]].Add(int.Parse(id[1]), @event);
            }
        }