Пример #1
0
 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;
         }
     }
 }
Пример #2
0
 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;
         }
     }
 }
Пример #3
0
        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);
        }
Пример #4
0
        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);
            }
        }
Пример #5
0
        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);
            }
        }
Пример #6
0
        public static ProjectConfiguration GetConfiguration(this ProjectStructure self, string configurationId)
        {
            ProjectConfiguration worldConfiguration = self.ProjectConfigurations.GetProjectConfigurationByConfigurationSid(configurationId);

            return(worldConfiguration);
        }
Пример #7
0
        public static Scene GetProjectScene(this ProjectStructure self, string projectSceneSid)
        {
            Scene scene = self.Scenes.GetProjectScene(projectSceneSid);

            return(scene);
        }