mirror of
https://github.com/glest/glest-source.git
synced 2025-08-29 10:49:48 +02:00
- added support for multiple animation models for each skill and display a them randomly during game play
This commit is contained in:
@@ -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;
|
||||
|
@@ -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()){
|
||||
|
Reference in New Issue
Block a user