本文整理汇总了C++中object::AttachMesh方法的典型用法代码示例。如果您正苦于以下问题:C++ object::AttachMesh方法的具体用法?C++ object::AttachMesh怎么用?C++ object::AttachMesh使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类object
的用法示例。
在下文中一共展示了object::AttachMesh方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: 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;
}
示例2: FxPyritHammeringTimer
func FxPyritHammeringTimer(object c, proplist fx, int time)
{
if (!fx.hat)
{
// Pyit has a red hat!
fx.hat = c->AttachMesh(Hat, "skeleton_head", "main", Trans_Translate(5500, 0, 0));
}
if (FrameCounter() < this.anim_continue_frame || c.has_sequence) return FX_OK;
this.anim = 0;
if (!fx.catapult) if (!(fx.catapult = c->FindObject(Find_ID(Catapult), Sort_Distance()))) return FX_OK;
if ((!Random(20) && GetPlayerCount()) || this.was_walk_interrupted)
{
// Move between two places (only if players are joined so Pyrit stays in place for object saving)
var new_pos = [fx.catapult->GetX()-24, fx.catapult->GetX()+26][c->GetX() < fx.catapult->GetX()];
c->SetCommand("MoveTo", nil, new_pos, fx.catapult->GetY());
this.anim_continue_frame = FrameCounter() + 50;
this.was_walk_interrupted = false;
}