Implemented hoe
This commit is contained in:
@@ -313,6 +313,9 @@ GameObject* parse<GameObject> (boost::property_tree::ptree& root)
|
||||
else if (child.first == "Giftable")
|
||||
gameObj->addComponent(parse<Giftable>(child.second));
|
||||
|
||||
else if (child.first == "Hoe")
|
||||
gameObj->addComponent(parse<Hoe>(child.second));
|
||||
|
||||
else if (child.first == "Item")
|
||||
gameObj->addComponent(parse<Item>(child.second));
|
||||
|
||||
@@ -356,6 +359,17 @@ Configuration* parse<Configuration> (boost::property_tree::ptree& root)
|
||||
return config;
|
||||
}
|
||||
|
||||
template <>
|
||||
Hoe* parse<Hoe> (boost::property_tree::ptree& root)
|
||||
{
|
||||
// Ensure we are on the scene node (property tree seems to add root of its own)
|
||||
if (root.front().first == "Hoe")
|
||||
root = root.front().second;
|
||||
|
||||
Hoe* hoe = new Hoe();
|
||||
return hoe;
|
||||
}
|
||||
|
||||
template <>
|
||||
Item* parse<Item> (boost::property_tree::ptree& root)
|
||||
{
|
||||
|
Reference in New Issue
Block a user