| | 1 | | using System; |
| | 2 | | using System.Linq; |
| | 3 | | using UnityEngine; |
| | 4 | |
|
| | 5 | | namespace DCL.Huds.QuestsPanel |
| | 6 | | { |
| | 7 | | [CreateAssetMenu(menuName = "Variables/QuestPanelTaskFactory", fileName = "QuestPanelTaskFactory", order = 0)] |
| | 8 | | public class QuestsPanelTaskFactory : ScriptableObject |
| | 9 | | { |
| | 10 | | [Serializable] |
| | 11 | | public class Entry |
| | 12 | | { |
| | 13 | | public string type; |
| | 14 | | public GameObject prefab; |
| | 15 | | } |
| | 16 | |
|
| | 17 | | [SerializeField] private Entry[] entries; |
| | 18 | |
|
| 16 | 19 | | public GameObject GetPrefab(string type) { return entries.FirstOrDefault(x => x.type == type)?.prefab; } |
| | 20 | | } |
| | 21 | | } |