Exemple #1
0
        public ICollection <Entity> CreateEntities <T>(string configPathWithWildcard) where T : Template
        {
            List <Entity> list = new List <Entity>();

            foreach (string str in ConfigurationService.GetPathsByWildcard(configPathWithWildcard))
            {
                Entity item = EngineService.CreateEntityBuilder().SetTemplate(typeof(T)).SetConfig(str).Build(true);
                list.Add(item);
            }
            return(list);
        }
Exemple #2
0
 public Entity CreateEntity(long templateId, string configPath, long id) =>
 EngineService.CreateEntityBuilder().SetId(id).SetTemplate(this.templateRegistry.GetTemplateInfo(templateId)).SetConfig(configPath).Build(true);
Exemple #3
0
 public Entity CreateEntity(Type templateType, string configPath) =>
 EngineService.CreateEntityBuilder().SetConfig(configPath).SetTemplate(templateType).Build(true);
Exemple #4
0
 public Entity CreateEntity <T>(string configPath, long id) where T : Template =>
 EngineService.CreateEntityBuilder().SetId(id).SetConfig(configPath).SetTemplate(typeof(T)).Build(true);
Exemple #5
0
 public Entity CreateEntity(string name) =>
 EngineService.CreateEntityBuilder().SetName(name).Build(true);
Exemple #6
0
 public Entity CreateEntity <T>(YamlNode yamlNode) where T : Template =>
 EngineService.CreateEntityBuilder().SetTemplate(typeof(T)).SetTemplateYamlNode(yamlNode).Build(true);
Exemple #7
0
 public Entity CloneEntity(string name, Entity entity) =>
 this.entityCloner.Clone(name, (EntityInternal)entity, EngineService.CreateEntityBuilder());