You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
502 B
19 lines
502 B
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
[CreateAssetMenu(menuName = "GameData/CharactersList", fileName = "CharactersList")]
|
|
public class CharactersList : ScriptableObject
|
|
{
|
|
public List<Character> Characters;
|
|
|
|
public Character FindCharacter(string name)
|
|
{
|
|
if (string.IsNullOrEmpty(name)) return null;
|
|
return Characters.Find(x => x.IDName == name);
|
|
}
|
|
|
|
public int GetIndex(Character character)
|
|
{
|
|
return Characters.IndexOf(character);
|
|
}
|
|
}
|
|
|