PVZFusionTranslation/BepInEx/Patches/GameObjects/TowerOption_Patch.cs
TuanAnh2901 7be9b8c514 Update BepInEx to the current progress.
Credit: Moon & JustNull
2025-07-31 20:17:08 +07:00

21 lines
No EOL
708 B
C#

using HarmonyLib;
using TMPro;
using PvZ_Fusion_Translator__BepInEx_.AssetStore;
using UnityEngine;
namespace PvZ_Fusion_Translator__BepInEx_.Patches.GameObjects
{
[HarmonyPatch(typeof(TowerOption))]
public static class TowerOption_Patch
{
[HarmonyPatch(nameof(TowerOption.Start))]
[HarmonyPostfix]
private static void Postfix_Start(TowerOption __instance)
{
//TextMeshProUGUI[] allTexts = __instance.GetComponentsInChildren<TextMeshProUGUI>(true);
__instance.introduce.text = StringStore.TranslateText(__instance.introduce.text);
__instance.introduce.font = FontStore.LoadTMPFont(Utils.Language.ToString());
}
}
}