本文整理汇总了C++中Core::Distance方法的典型用法代码示例。如果您正苦于以下问题:C++ Core::Distance方法的具体用法?C++ Core::Distance怎么用?C++ Core::Distance使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Core
的用法示例。
在下文中一共展示了Core::Distance方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: number
//.........这里部分代码省略.........
// Returns true on first Script launch, IOW initial area load
if (!Processed()) {
returnValue = true;
break;
}
//object_node* object = FindObjectNode(trig);
//returnValue = Object::CheckIfNodeInList(object,
// fTarget->LastScriptRoundResults()->Hitters());
break;
}
case 0x0022:
{
/* TimerExpired(I:ID*) */
std::ostringstream stringStream;
stringStream << fTarget.Target()->Name() << " " << trig->parameter1;
printf("TimerExpired %s\n", stringStream.str().c_str());
GameTimer* timer = GameTimer::Get(stringStream.str().c_str());
if (timer != NULL && timer->Expired()) {
returnValue = true;
}
break;
}
case 0x002F:
{
/* 0x002F Heard(O:Object*,I:ID*SHOUTIDS)
Returns true only if the active CRE was within 30 feet
of the specified object and the specified object shouted
the specified number (which does not have to be in
SHOUTIDS.ids) in the last script round.
NB. If the object is specified as a death variable,
the trigger will only return true if the corresponding
object shouting also has an Enemy-Ally flag of NEUTRAL. */
Object* object = FindObject(trig);
if (object != NULL && core->Distance(fTarget.Target(), object) <= 30
&& object->LastScriptRoundResults()->Shouted()
== trig->parameter1) {
returnValue = true;
}
break;
}
case 0x4017:
{
// Race()
Object* object = FindObject(trig);
if (object != NULL)
returnValue = object->IsRace(trig->parameter1);
break;
}
case 0x4018:
{
/* 0x4018 Range(O:Object*,I:Range*)
Returns true only if the specified object
is within distance given (in feet) of the active CRE. */
Object* object = FindObject(trig);
if (object != NULL)
returnValue = core->Distance(object, fTarget.Target()) <= trig->parameter1;
break;
}
case 0x401C:
{
/* See(O:Object*)