public Bitmap GetEditorImage(EntityType tileObjectType) { if (tileObjectType.CanActivate) { TileObject tileObject = tileObjectType.Activate(); return(GetEditorImage(tileObject)); } return(null); }
private static TileObject DeserializeTileObject(XmlElement element) { XmlAttribute typeAttribute = element.GetAttributeNode("Type"); if (typeAttribute == null) { return(null); } string fullTypeName = typeAttribute.Value; //Type type = Type.GetType(fullTypeName); EntityType type = TypeManagement.TypeManager.Instance.GetEntityType(fullTypeName); if (type == null) { Logging.LogManager.EditorLogger.LogError($"Type {fullTypeName} was not found!"); return(null); } else { TileObject instance = type.Activate(); instance.ReadFields(element); return(instance); } }