卡牌更新
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
using Continentis.MainGame;
|
||||
using Continentis.MainGame.Card;
|
||||
using I2.Loc;
|
||||
using UnityEngine;
|
||||
|
||||
@@ -20,6 +22,18 @@ namespace SLSFramework.General
|
||||
return original;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 本地化字符串,并使用卡牌上下文解析 $Attribute / $Keyword 等文本内函数
|
||||
/// </summary>
|
||||
/// <param name="original">本地化 Key</param>
|
||||
/// <param name="card">提供属性上下文的卡牌实例</param>
|
||||
/// <returns>翻译并解析后的最终文本</returns>
|
||||
public static string Localize(this string original, CardInstance card)
|
||||
{
|
||||
string translated = original.Localize();
|
||||
return CardTextInterpreter.InterpretText(card, translated);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 本地化字符串,使用指定的根GameObject进行i2Loc参数替换
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user