public void OnCharacterTypeChange(PlayerCharacterType type) { DisplayedCharacterType = type; var pair = IconMappings.Find(x => x.Type == DisplayedCharacterType); CharacterIcon.sprite = pair.Icon; CharacterTypeText.text = type.ToString(); }
public static PlayerCharacter GetCharacterByType(PlayerCharacterType type) { return(Resources.Load <PlayerCharacter>(ScriptableObjectPaths.PlayerCharacterPath + type.ToString())); }