29 lines
653 B
C#
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);
|
|
}
|
|
}
|
|
}
|