hellbound/Assets/Sources/I2/Localization/Scripts/Manager/LocalizationManager_Targets.cs

31 lines
830 B
C#
Raw Normal View History

2021-11-26 11:16:25 +03:00
using System.Collections.Generic;
namespace I2.Loc
{
public static partial class LocalizationManager
{
#region Variables: Misc
public static List<ILocalizeTargetDescriptor> mLocalizeTargets = new List<ILocalizeTargetDescriptor>();
#endregion
public static void RegisterTarget( ILocalizeTargetDescriptor desc )
{
if (mLocalizeTargets.FindIndex(x => x.Name == desc.Name) != -1)
return;
for (int i = 0; i < mLocalizeTargets.Count; ++i)
{
if (mLocalizeTargets[i].Priority > desc.Priority)
{
mLocalizeTargets.Insert(i, desc);
return;
}
}
mLocalizeTargets.Add(desc);
}
}
}