Files
butchers-games-test/Assets/Scripts/Game/Meta/PlayerSkinDef.cs
T
Boris Nikolaev 5f1e94b653 add project files
2026-08-14 01:58:31 +03:00

29 lines
653 B
C#

using UnityEngine;
using OHM.UnityToolkit.Localization;
[CreateAssetMenu(fileName = "Player Skin Def", menuName = "GameSqueleton/Player Skin Def")]
public class PlayerSkinDef : CustomizableDef
{
public Player prefab;
public string GetLocalizedName()
{
return GetLocalizedName(base.name);
}
public static string GetLocalizedName(string skinId)
{
return LocalizationManager.Instance.Localize(("skin_" + skinId).ToLowerInvariant());
}
[ContextMenu("TEST")]
private void TEST()
{
AppController app = UnityEngine.Object.FindObjectOfType<AppController>();
if (app != null)
{
app.PlayerSkinController.SetCurrentValue(this);
}
}
}