private void AddObjectToDictionary(EnumObjects type, GameObject obj) { if (obj == null) { Debug.LogError(type.ToString() + " is not set in manager"); } else { _listObjects.Add(new KeyValuePair <EnumObjects, GameObject>(type, obj)); } }
public GameObject GetObject(EnumObjects type) { return(_listObjects[(int)type].Value); }