add project files
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user