예제 #1
0
        public void LoadSpriteTranslation()
        {
            var resourcePool = new TextureTranslationPool();
            var textureFiles = Directory.GetFiles(SpriteTranslationDir, "*.png", SearchOption.AllDirectories);

            foreach (var file in textureFiles)
            {
                resourcePool.AddResource(file);
            }

            SpriteTranslationPool = resourcePool;
            Logger.Log(LogLevel.Debug, $"[MaidTranslate] {resourcePool.Resource.Count} sprite translation loaded.");
        }
예제 #2
0
        public void LoadTextureTranslation()
        {
            var resourcePool = new TextureTranslationPool();
            var textureFiles = Directory.GetFiles(TextureTranslationDir, "*.*", SearchOption.AllDirectories)
                               .Where(s => s.EndsWith(".png") || s.EndsWith(".tex")).ToList();

            foreach (var file in textureFiles)
            {
                resourcePool.AddResource(file);
            }

            TextureTranslationPool = resourcePool;
            Logger.Log(LogLevel.Debug, $"[MaidTranslate] {resourcePool.Resource.Count} texture translation loaded.");
        }
예제 #3
0
 public bool TranslateTexture(Scene?scene, TextureTranslationEventArgs e, out TextureResource resource)
 {
     return(TextureTranslationPool.Translate(scene, e, out resource));
 }