本文整理汇总了C++中object::SetAction方法的典型用法代码示例。如果您正苦于以下问题:C++ object::SetAction方法的具体用法?C++ object::SetAction怎么用?C++ object::SetAction使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类object
的用法示例。
在下文中一共展示了object::SetAction方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: FxFireDashStop
func FxFireDashStop(object target, proplist effect, int reason, bool temporary)
{
if(temporary)
return;
target->Unstuck();
target->SetObjectLayer(nil);
target->SetAction("Jump");
ExplosionEffect(effect.Size2, target->GetX(), target->GetY(),0,0,0);
for(var o in FindObjects(Find_Distance(effect.Size2, target->GetX(), target->GetY()), Find_Func("CanBeHit", target)))
{
if(o->GetOwner() == target->GetOwner())
continue;
var angle = Angle(target->GetX(), target->GetY(), o->GetX(), o->GetY());
o->AddFireHitEffect();
o->Fling(Sin(angle, 8), -Cos(angle, 8) - 2);
target->WeaponDamage(o, effect.SpellDamage2);
}
target->CastObjects(Flame, RandomX(6,8), RandomX(10,25));
//effect.marker->RemoveObject();
//effect.clonk->MakeHitable(true);
}
示例2: Dlg_Pyrit_Init
func Dlg_Pyrit_Init(object clonk)
{
// Clonk moves slowly.
clonk.ActMap = { Prototype = Clonk.ActMap, Walk = { Prototype = Clonk.ActMap.Walk } };
clonk.ActMap.Walk.Speed /= 3;
clonk->SetAction("Walk");
// Hammering animation
AddEffect("PyritHammering", clonk, 1, Pyrit_Hammer_SwingTime+5, this);
return true;
}
示例3: Dlg_Lara_Init
func Dlg_Lara_Init(object clonk)
{
// Clonk movement speed adjustment.
clonk.ActMap = { Prototype = Clonk.ActMap, Walk = { Prototype = Clonk.ActMap.Walk } };
clonk.ActMap.Walk.Speed /= 2;
clonk->SetAction("Walk");
// Carrying stuff around
AddEffect("LaraWalking", clonk, 1, 12, this);
return true;
}
示例4: Dlg_Pyrit_Init
func Dlg_Pyrit_Init(object clonk)
{
// Pyit has a red hat!
clonk->AttachMesh(Hat, "skeleton_head", "main", Trans_Translate(5500, 0, 0));
// Clonk moves slowly.
clonk.ActMap = { Prototype = Clonk.ActMap, Walk = { Prototype = Clonk.ActMap.Walk } };
clonk.ActMap.Walk.Speed /= 3;
clonk->SetAction("Walk");
// Hammering animation
AddEffect("PyritHammering", clonk, 1, Pyrit_Hammer_SwingTime+5, this);
return true;
}
示例5: FxAttack_PanicStart
func FxAttack_PanicStart(object c, proplist fx, int temp)
{
if (temp) return;
// high walk speed
c.ActMap = { Prototype = Clonk.ActMap, Walk = { Prototype = Clonk.ActMap.Walk } };
c.ActMap.Walk.Speed = c.ActMap.Walk.Speed * 3 / 2;
c->SetAction("Walk");
// drop heavy stuff
var item = c->Contents();
if (item && item->~IsBarrel()) item->Exit();
// start running
FxAttack_PanicTimer(c, fx, 0);
return FX_OK;
}
示例6: ControlUse
public func ControlUse(object clonk, int x, int y)
{
x = LandscapeWidth() / 2 + 100;
y = baseHeight - 20;
DrawParticleLine("Flash", 0,0,-GetX()+x,-GetY()+y, 3, 0, 0, 8, {Prototype = Particles_Flash(), Size = 20, R = 50, G = 50, B = 255});
// Make sure the clonk loses the attach procedure.
var action = clonk->GetAction();
if (action && clonk.ActMap[action].Procedure == DFA_ATTACH)
clonk->SetAction("Jump");
clonk->SetPosition(x, y);
clonk->SetXDir(0);
clonk->SetYDir(-5);
RemoveObject();
return 1;
}