本文整理汇总了C++中object::GetProcedure方法的典型用法代码示例。如果您正苦于以下问题:C++ object::GetProcedure方法的具体用法?C++ object::GetProcedure怎么用?C++ object::GetProcedure使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类object
的用法示例。
在下文中一共展示了object::GetProcedure方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetTargetMovementObject
// Returns the object that determines the movement of the target.
// For example the object the target is attached to or contained in.
private func GetTargetMovementObject(object target)
{
// If attached: return the object the target is attached to.
if (target->GetProcedure() == DFA_ATTACH)
if (target->GetActionTarget())
return target->GetActionTarget();
// Default: return the target itself.
return target;
}
示例2: RejectUse
public func RejectUse(object clonk)
{
// General inability?
if(clonk->GetProcedure() != "WALK") return true;
if (GBackSemiSolid(0, 0)) return true;
/*
This check might make sense, so that you can just hold the button and walk over the ground until the soil is fitting.
However, you would never get the $NoSuitableGround$ message in that case.
// Check soil below the Clonk's feet
var ground_y = clonk->GetDefBottom() - clonk->GetY() + 1;
if (GetMaterialVal("Soil", "Material", GetMaterial(0, ground_y)) == 0) return true;
*/
return false;
}
示例3: AddAI
// Add AI execution timer to target Clonk
func AddAI(object clonk)
{
var fx = GetEffect("S2AI", clonk);
if (!fx) fx = AddEffect("S2AI", clonk, 1, 3, nil, S2AI);
if (!fx || !clonk) return nil;
fx.ai = S2AI;
clonk.ExecuteS2AI = S2AI.Execute;
if (clonk->GetProcedure() == "PUSH") fx.vehicle = clonk->GetActionTarget();
BindInventory(clonk);
SetHome(clonk);
SetGuardRange(clonk, fx.home_x-S2AI_DefGuardRangeX, fx.home_y-S2AI_DefGuardRangeY, S2AI_DefGuardRangeX*2, S2AI_DefGuardRangeY*2);
SetMaxAggroDistance(clonk, S2AI_DefMaxAggroDistance);
return fx;
}