示例#1
0
        internal static void UpdateTreeForChar(ChaFile chaFile, Action <string> callback)
        {
            if (chaFile == null)
            {
                return;
            }
            void Handler(string fullName)
            {
                if (string.IsNullOrEmpty(fullName))
                {
                    return;
                }
                var match = Singleton <IllusionStudio> .Instance.dicInfo
                            .Where(e => e.Value is OCIChar ociChar && ociChar.charInfo.chaFile == chaFile)
                            .Select(e => e.Key).FirstOrDefault();

                if (match == null)
                {
                    return;
                }
                match.textName = fullName;
                callback?.Invoke(fullName);
            }

            chaFile.TranslateFullName(Handler);
        }