本文整理汇总了C++中object::Call方法的典型用法代码示例。如果您正苦于以下问题:C++ object::Call方法的具体用法?C++ object::Call怎么用?C++ object::Call使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类object
的用法示例。
在下文中一共展示了object::Call方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SetEncounterCB
// Set callback function name to be called in game script when this AI is first encountered
// Callback function first parameter is (this) AI clonk, second parameter is player clonk.
// The callback should return true to be cleared and not called again. Otherwise, it will be called every time a new target is found.
func SetEncounterCB(object clonk, string cb_fn)
{
var fx = GetEffect("S2AI", clonk);
if (!fx || !clonk) return false;
fx.encounter_cb = cb_fn;
clonk->Call(fx.ai.UpdateDebugDisplay, fx);
return true;
}
示例2: SetGuardRange
// Set the guard range to the provided rectangle
func SetGuardRange(object clonk, int x, int y, int wdt, int hgt)
{
var fx = GetEffect("S2AI", clonk);
if (!fx || !clonk) return false;
fx.guard_range = {x=x, y=y, wdt=wdt, hgt=hgt};
clonk->Call(fx.ai.UpdateDebugDisplay, fx);
return true;
}
示例3: SetAllyAlertRange
// Set range in which, on first encounter, allied AI Clonks get the same aggro target set
func SetAllyAlertRange(object clonk, int new_range)
{
var fx = GetEffect("S2AI", clonk);
if (!fx || !clonk) return false;
fx.ally_alert_range = new_range;
clonk->Call(fx.ai.UpdateDebugDisplay, fx);
return true;
}
示例4: BindInventory
// Set the current inventory to be removed when the clonk dies. Only works if clonk has an AI.
func BindInventory(object clonk)
{
var fx = GetEffect("S2AI", clonk);
if (!fx || !clonk) return false;
var cnt = clonk->ContentsCount();
fx.bound_weapons = CreateArray(cnt);
for (var i=0; i<cnt; ++i) fx.bound_weapons[i] = clonk->Contents(i);
clonk->Call(fx.ai.UpdateDebugDisplay, fx);
return true;
}