本文整理汇总了C++中SimSet::callOnChildren方法的典型用法代码示例。如果您正苦于以下问题:C++ SimSet::callOnChildren方法的具体用法?C++ SimSet::callOnChildren怎么用?C++ SimSet::callOnChildren使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SimSet
的用法示例。
在下文中一共展示了SimSet::callOnChildren方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: callOnChildren
void SimSet::callOnChildren( const String &method, S32 argc, ConsoleValueRef argv[], bool executeOnChildGroups )
{
// Prep the arguments for the console exec...
// Make sure and leave args[1] empty.
ConsoleValueRef args[21];
args[0] = method.c_str();
for (S32 i = 0; i < argc; i++)
args[i + 2] = argv[i];
for( iterator i = begin(); i != end(); i++ )
{
SimObject *childObj = static_cast<SimObject*>(*i);
if( childObj->isMethod( method.c_str() ) )
Con::execute(childObj, argc + 2, args);
if( executeOnChildGroups )
{
SimSet* childSet = dynamic_cast<SimSet*>(*i);
if ( childSet )
childSet->callOnChildren( method, argc, argv, executeOnChildGroups );
}
}
}