2026-04-22 09:52:55 +08:00
|
|
|
using FairyGUI;
|
|
|
|
|
|
2026-04-22 11:13:16 +08:00
|
|
|
namespace LoveLegend
|
2026-04-22 09:52:55 +08:00
|
|
|
{
|
|
|
|
|
public static class FGUIHelper
|
|
|
|
|
{
|
|
|
|
|
public static void AddFguiTimer(float interval, int repeat, TimerCallback callback, object callbackParam)
|
|
|
|
|
{
|
|
|
|
|
Timers.inst.Add(interval, repeat, callback, callbackParam);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static string SetGLoaderUrl(GLoader gLoader, string pkgName, string resName)
|
|
|
|
|
{
|
|
|
|
|
var url = UIPackage.GetItemURL(pkgName, resName);
|
|
|
|
|
if (url != null)
|
|
|
|
|
{
|
|
|
|
|
gLoader.url = url;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return url;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static void PlayClickSound()
|
|
|
|
|
{
|
|
|
|
|
if (UIConfig.buttonSound != null && UIConfig.buttonSound.nativeClip != null)
|
|
|
|
|
{
|
|
|
|
|
Stage.inst.PlayOneShotSound(UIConfig.buttonSound.nativeClip, UIConfig.buttonSoundVolumeScale);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|