UI更改与功能修正
This commit is contained in:
@@ -4,14 +4,49 @@ using UnityEngine;
|
||||
|
||||
namespace TcgEngine
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines all factions data
|
||||
/// </summary>
|
||||
[System.Serializable]
|
||||
public enum TeamTitle
|
||||
{
|
||||
Neutral,
|
||||
Light,
|
||||
Dark,
|
||||
Fire,
|
||||
Wind,
|
||||
Water
|
||||
}
|
||||
|
||||
public static class TeamTitleData
|
||||
{
|
||||
public static string Team(TeamTitle title)
|
||||
{
|
||||
switch (title)
|
||||
{
|
||||
case TeamTitle.Dark:
|
||||
return "dark";
|
||||
break;
|
||||
case TeamTitle.Fire:
|
||||
return "fire";
|
||||
break;
|
||||
case TeamTitle.Light:
|
||||
return "light";
|
||||
break;
|
||||
case TeamTitle.Water:
|
||||
return "water";
|
||||
break;
|
||||
case TeamTitle.Wind:
|
||||
return "wind";
|
||||
break;
|
||||
default:
|
||||
return "neutral";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[CreateAssetMenu(fileName = "TeamData", menuName = "TcgEngine/TeamData", order = 1)]
|
||||
public class TeamData : ScriptableObject
|
||||
{
|
||||
public string id;
|
||||
public TeamTitle id;
|
||||
public string title;
|
||||
public Sprite icon;
|
||||
public Color color;
|
||||
@@ -28,7 +63,7 @@ namespace TcgEngine
|
||||
{
|
||||
foreach (TeamData team in GetAll())
|
||||
{
|
||||
if (team.id == id)
|
||||
if (TeamTitleData.Team(team.id) == id)
|
||||
return team;
|
||||
}
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user