public List <ObjectInfo> GetSavedObjFromChunkPos(Vector2 pos, SavedObjType type) { List <ObjectInfo> newListofObjects = new List <ObjectInfo>(); for (int i = 0; i < savedObjLists[type].Count; i++) { ObjectInfo data = savedObjLists[type][i]; if (data.ChunkPos[0] == (int)pos.x && data.ChunkPos[1] == (int)pos.y) { newListofObjects.Add(data); } } return(newListofObjects); }
public List <ObjectInfo> GetSaveListByType(SavedObjType type) { return(savedObjLists[type]); }