1using System.Reflection;
18 throw new InvalidOperationException(
"Database not loaded.");
46 throw new InvalidOperationException($
"EntityTemplate \"{entityTemplateName}\" not found.");
55 if (componentType.GetTypeInfo().IsAssignableFrom(type.GetTypeInfo())) {
68 entity.Id = spawnEntityData.
EntityId;
79 if (valuesDictionary ==
null) {
87 if (valuesDictionary !=
null) {
static Type FindType(string typeName, bool skipSystemAssemblies, bool throwIfNotFound)
static ICollection< ValuesDictionary > EntitiesValuesDictionaries
static GameDatabase m_gameDatabase
static ValuesDictionary FindValuesDictionaryForComponent(ValuesDictionary entityVd, Type componentType)
static Entity CreateEntity(Project project, SpawnEntityData spawnEntityData, bool throwIfNotFound)
static Dictionary< string, ValuesDictionary > m_valueDictionaries
static XElement DatabaseNode
static Entity CreateEntity(Project project, string entityTemplateName, bool throwIfNotFound)
static GameDatabase GameDatabase
static Entity CreateEntity(Project project, string entityTemplateName, ValuesDictionary overrides, bool throwIfNotFound)
static void LoadDataBaseFromXml(XElement node)
static ValuesDictionary FindEntityValuesDictionary(string entityTemplateName, bool throwIfNotFound)
virtual Entity CreateEntity(ValuesDictionary valuesDictionary, int entityId=0)
IEnumerable< object > Values
void PopulateFromDatabaseObject(DatabaseObject databaseObject)
DatabaseObject DatabaseObject
void ApplyOverrides(ValuesDictionary overridesValuesDictionary)
static Database LoadDatabase(XElement node)