mirror of https://github.com/axmolengine/axmol.git
correct naming convetion
This commit is contained in:
parent
8db680b9ee
commit
80417f0f35
|
@ -732,7 +732,7 @@ Node* Node::getChildByName(const std::string& name)
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
void Node::EnumChildNodesByName(const std::string& name, std::function<void(Node* node, bool* stop)> callback)
|
||||
void Node::enumChildNodesByName(const std::string& name, std::function<void(Node* node, bool* stop)> callback)
|
||||
{
|
||||
for (auto& child : _children)
|
||||
{
|
||||
|
@ -746,7 +746,7 @@ void Node::EnumChildNodesByName(const std::string& name, std::function<void(Node
|
|||
return;
|
||||
}
|
||||
}
|
||||
child->EnumChildNodesByName(name, callback);
|
||||
child->enumChildNodesByName(name, callback);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -807,7 +807,7 @@ public:
|
|||
* node: A node that matches the name.
|
||||
* stop: A pointer to a Boolean variable. Your callback can set this to YES to terminate the enumeration.
|
||||
*/
|
||||
virtual void EnumChildNodesByName(const std::string& name, std::function<void(Node* node, bool* stop)> callback);
|
||||
virtual void enumChildNodesByName(const std::string& name, std::function<void(Node* node, bool* stop)> callback);
|
||||
/**
|
||||
* Returns a custom user data pointer
|
||||
*
|
||||
|
|
|
@ -392,8 +392,8 @@ void NodeEnumChildByNameTest::onEnter()
|
|||
auto fn1 = std::bind(&NodeEnumChildByNameTest::runAction1, this, std::placeholders::_1, std::placeholders::_2);
|
||||
auto fn2 = std::bind(&NodeEnumChildByNameTest::runAction2, this, std::placeholders::_1, std::placeholders::_2);
|
||||
|
||||
EnumChildNodesByName("sister1", fn1);
|
||||
EnumChildNodesByName("sister2", fn2);
|
||||
enumChildNodesByName("sister1", fn1);
|
||||
enumChildNodesByName("sister2", fn2);
|
||||
}
|
||||
|
||||
void NodeEnumChildByNameTest::runAction1(Node* node, bool* stop)
|
||||
|
|
Loading…
Reference in New Issue