public static void UpdateProjectScene(this ProjectStructure self, Scene changedLocation) { for (int i = 0; i < self.Scenes.Count; i++) { if (self.Scenes[i].Id == changedLocation.Id) { self.Scenes[i] = changedLocation; } } }
public static void UpdateProjectConfiguration(this ProjectStructure self, ProjectConfiguration changedConfiguration) { for (int i = 0; i < self.ProjectConfigurations.Count; i++) { if (self.ProjectConfigurations[i].Id == changedConfiguration.Id) { self.ProjectConfigurations[i] = changedConfiguration; } } }
public static void UpdateOrAddLocationPrefab(this ProjectStructure self, LocationPrefab changedLocationPrefab) { for (int i = 0; i < self.Locations.Count; i++) { if (self.Locations[i].Id == changedLocationPrefab.Id) { self.Locations[i] = changedLocationPrefab; return; } } self.Locations.Add(changedLocationPrefab); }
public static void RemoveProjectConfiguration(this ProjectStructure self, ProjectConfiguration deletedConfiguration) { ProjectConfiguration result = null; foreach (ProjectConfiguration worldConfiguration in self.ProjectConfigurations) { if (worldConfiguration.Id == deletedConfiguration.Id) { result = worldConfiguration; } } if (result != null) { self.ProjectConfigurations.Remove(result); } }
public static void RemoveProjectScene(this ProjectStructure self, Scene deletedLocation) { Scene result = null; foreach (Scene scene in self.Scenes) { if (scene.Id == deletedLocation.Id) { result = scene; } } if (result != null) { self.Scenes.Remove(result); } }
public static ProjectConfiguration GetConfiguration(this ProjectStructure self, string configurationId) { ProjectConfiguration worldConfiguration = self.ProjectConfigurations.GetProjectConfigurationByConfigurationSid(configurationId); return(worldConfiguration); }
public static Scene GetProjectScene(this ProjectStructure self, string projectSceneSid) { Scene scene = self.Scenes.GetProjectScene(projectSceneSid); return(scene); }