Game/Source/Map.cpp
// Load a group of properties from a node and fill a list with it
Load a group of properties from a node and fill a list with it
Load a group of properties from a node and fill a list with it
bool Map::LoadProperties(pugi::xml_node& node, Properties& properties)
{
	bool ret = false;
	pugi::xml_node data = node.child("properties");
	if (data != NULL)
	{
		pugi::xml_node property;
		for (property = data.child("property"); property; property = property.next_sibling("property"))
		{
			Properties::Property* newProperty = new Properties::Property();
			newProperty->name = property.attribute("name").as_string();
			newProperty->value = property.attribute("value").as_int();
			properties.propertyList.Add(newProperty);
		}
	}
	return ret;
}
bool Map :: LoadProperties ( pugi :: xml_node & node , Properties & properties ) { bool ret = false ; pugi :: xml_node data = node . child ( " " ) ; if ( data != NULL ) { pugi :: xml_node property ; for ( property = data . child ( " " ) ; property ; property = property . next_sibling ( " " ) ) { Properties :: Property * newProperty = new Properties :: Property ( ) ; newProperty -> name = property . attribute ( " " ) . as_string ( ) ; newProperty -> value = property . attribute ( " " ) . as_int ( ) ; properties . propertyList . Add ( newProperty ) ; } } return ret ; }
Load a group of properties from a node and fill a list with it
Load a group of properties from a node and fill a list with it