Beispiel #1
0
 protected override void _create()
 {
     MediaInfo = new MediaInfo
     {
         Audios = new List <string>(),
         Images = new List <string>()
     };
     DirectoryCreate($"{OutputPath}/{Name}");
     DirectoryCreate($"{OutputPath}/res/img/{Name}");
     DirectoryCreate($"{OutputPath}/res/audio/{Name}");
     DirectoryCreate($"{OutputPath}/res/font/{Name}");
     Collectors.ForEach(collector =>
     {
         collector.Collect(Name);
         if (collector.I18NImages != null)
         {
             ImagePass(collector);
         }
         if (collector.I18NAudios != null)
         {
             AudioPass(collector);
         }
         if (collector.I18NFonts != null)
         {
             FontPass(collector);
         }
     });
     SaveFile($"{OutputPath}/{Name}/mediaInfo.json", JsonUtility.ToJson(MediaInfo));
 }
Beispiel #2
0
        protected override void _create()
        {
            DirectoryCreate($"{OutputPath}/res/font/{Name}");
            RuntimeSetting = Resources.Load <RosettaRuntimeSetting>("RosettaRuntimeSetting");
            var str = "";

            str += GetHead();
            Collectors.ForEach(collector =>
            {
                collector.Collect(Name);
                if (collector.I18NStrings != null)
                {
                    foreach (var i18NString in collector.I18NStrings.Values)
                    {
                        str += GetComment(i18NString.Comment, i18NString.PathList);
                        str += GetBody(i18NString.Value) + "\n";
                    }
                }
            });
            SaveFile($"{OutputPath}/{Name}.pot", str);
        }