Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- [System.Serializable]
- public class EventData
- {
- public string name;
- [TextArea(0, 200)]
- public string text;
- }
- public class EventDatabase : MonoBehaviour
- {
- public static EventDatabase I;
- private void Awake()
- {
- I = this;
- }
- public EventData[] events;
- public EventData GetEvent(string name)
- {
- for (int i = 0; i < events.Length; i++)
- {
- if (events[i].name == name) return events[i];
- }
- return null;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement