本文整理汇总了C++中object::CreateParticle方法的典型用法代码示例。如果您正苦于以下问题:C++ object::CreateParticle方法的具体用法?C++ object::CreateParticle怎么用?C++ object::CreateParticle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类object
的用法示例。
在下文中一共展示了object::CreateParticle方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: JumpEffect
func JumpEffect(object clonk, dir)
{
var from, to;
if (dir == "Up")
{
from = 50;
to = 130;
}
if (dir == "Left")
{
from = -30;
to = 50;
}
if (dir == "Right")
{
from = 130;
to = 210;
}
if (dir == "Down")
{
from = 230;
to = 310;
}
clonk->Sound("Fire::Inflame", false, 30, nil, nil, nil, -100);
var trailparticles =
{
Size = PV_Linear(0, 20),
Alpha = PV_Linear(255, 0),
OnCollision = PC_Die(),
CollisionVertex = 0,
DampingX = 900, DampingY = 900,
BlitMode = GFX_BLIT_Additive
};
trailparticles = Particles_Colored(trailparticles, GetPlayerColor(clonk->GetOwner()));
for(var i = from; i < to; i+=5)
{
var r = 10;
var x = Cos(i, r);
var y = Sin(i, r);
clonk->CreateParticle("Shockwave", x, y, Cos(i, r), Sin(i, r), 60, trailparticles, 2);
}
}
示例2: BlockEffect
func BlockEffect(object clonk, int radius)
{
var trailparticles =
{
Size = PV_KeyFrames(0, 0, 0, 200, PV_Random(10, 25), 1000, 0),
Alpha = PV_Linear(255, 0),
OnCollision = PC_Die(),
CollisionVertex = 0,
DampingX = 900, DampingY = 900,
BlitMode = GFX_BLIT_Additive
};
trailparticles = Particles_Colored(trailparticles, GetPlayerColor(clonk->GetOwner()));
clonk->CreateParticle("Shockwave",
PV_Sin(PV_Random(0, 360, 0, 1), PV_Random(radius - 1, radius + 1, 0, 2)),
PV_Cos(PV_Random(0, 360, 0, 1), PV_Random(radius - 1, radius + 1, 0, 2)),
PV_Random(-5, 5), PV_Random(-5, 5), PV_Random(20, 30), trailparticles, 100);
}
示例3: FxTimeHitTimer
func FxTimeHitTimer(object target, proplist effect, int time)
{
var lightning =
{
Prototype = Particles_ElectroSpark2(),
Size = PV_Linear(PV_Random(2,5),0),
BlitMode = GFX_BLIT_Additive,
Rotation = PV_Random(0,360),
R = 255,
G = 150,
B = 50,
Attach = ATTACH_Front | ATTACH_MoveRelative,
};
target->CreateParticle("Lightning", RandomX(-5, 5), RandomX(-10, 10), 0, 0, 10, lightning, 2);
if(time > 40)
return -1;
}
示例4: FxBlockedTimer
func FxBlockedTimer(object target, proplist fx, int time)
{
if(time >= BlockDur)
return -1;
var lightning =
{
Prototype = Particles_ElectroSpark2(),
Size = PV_Linear(PV_Random(3,6),0),
BlitMode = GFX_BLIT_Additive,
Rotation = PV_Random(0,360),
R = 100,
G = 100,
B = pB,
Attach = ATTACH_Front,
};
target->CreateParticle("Lightning", RandomX(-6, 6), RandomX(-6, 6), 0, 0, 20, lightning, 3);
}