- added support for multiple animation models for each skill and display a them randomly during game play

This commit is contained in:
Mark Vejvoda
2011-06-25 05:23:41 +00:00
parent d0d31e4bfe
commit e0860309c0
4 changed files with 44 additions and 6 deletions

View File

@@ -109,6 +109,7 @@ public:
XmlAttribute *getAttribute(const string &name,bool mustExist=true) const;
XmlNode *getChild(unsigned int i) const;
XmlNode *getChild(const string &childName, unsigned int childIndex=0) const;
vector<XmlNode *> getChildList(const string &childName) const;
bool hasChildAtIndex(const string &childName, int childIndex=0) const;
bool hasChild(const string &childName) const;
XmlNode *getParent() const;

View File

@@ -275,6 +275,16 @@ XmlNode *XmlNode::getChild(unsigned int i) const {
return children[i];
}
vector<XmlNode *> XmlNode::getChildList(const string &childName) const {
vector<XmlNode *> list;
for(unsigned int j = 0; j < children.size(); ++j) {
if(children[j]->getName() == childName) {
list.push_back(children[j]);
}
}
return list;
}
XmlNode *XmlNode::getChild(const string &childName, unsigned int i) const{
if(i>=children.size()){