本文整理汇总了C++中local::GetY方法的典型用法代码示例。如果您正苦于以下问题:C++ local::GetY方法的具体用法?C++ local::GetY怎么用?C++ local::GetY使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类local
的用法示例。
在下文中一共展示了local::GetY方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Timer
func Timer()
{
var pDead2, pNewTarget;
if(!pTarget)
{
for(var pDead in FindObjects(Find_Action("Dead"), Find_Distance(100)))
{
if(GetPhase(pDead) < 4)
if(PathFree(GetX(), GetY(), pDead->GetX(), pDead->GetY()))
{
pDead2 = pDead;
break;
}
}
pDead = pDead2;
if(pDead)
{
for(pNewTarget in FindObjects(Find_OCF(OCF_Alive), Find_Distance(100), Find_Hostile(GetOwner(pDead))))
{
if(PathFree(GetX(), GetY(), pNewTarget->GetX(), pNewTarget->GetY()))
{
iTimer = 0;
pTarget = pNewTarget;
}
}
}
}
if(pTarget)
{
iTimer++;
if(iTimer%10 != 0) return;
if(iTimer > 100) pTarget = 0;
else if(!PathFree(GetX(), GetY(), pTarget->GetX(), pTarget->GetY()) && !pTarget->Contained()) pTarget = 0;
if(!pTarget) return;
Message("Töte niemanden an diesem heiligen Ort!", this);
DrawLightning(GetX(),GetY(),pTarget->GetX(), pTarget->GetY());
Punch(pTarget, 5);
}
}
示例2: HomeCall
func HomeCall()
{
ClearEffects();
Sound("Ball::ball_call", false, 20);
var eff = AddEffect("HomeCall", this, 1, 1, this);
eff.x = master->GetX();
eff.y = master->GetY();
var angle = Angle(GetX(), GetY(), eff.x, eff.y, 10);
SetVelocity(angle, Speed, 10);
}
示例3: AttackOrder
func AttackOrder(x, y)
{
ClearEffects();
Sound("Ball::ball_order", false, 20);
var eff = AddEffect("MoveTo", this, 1, 1, this);
eff.x = master->GetX() + x;
eff.y = master->GetY() + y;
var angle = Angle(GetX(), GetY(), eff.x, eff.y, 10);
SetVelocity(angle, Speed, 10);
}
示例4: FxFollowMasterTimer
func FxFollowMasterTimer(object target, proplist effect, int time)
{
if(!master)
{
KillBall();
return -1;
}
MoveToPos(master->GetX(), master->GetY() - 15);
DrawParticleLine("Flash", 0, 0, ox-GetX(), oy-GetY(), 1, 0, 0, 15, followtrailparticles);
ox=GetX();
oy=GetY();
}
示例5: Check
func Check()
{
if(!target) return RemoveObject();
if(!update)
{
if(temp > 100)
{
Break();
}
}
else
{
if(temp > 200)
{
Break();
}
}
SetPosition(target->GetX()+55,target->GetY()+40);
if(target->~IsPegasusGate() && !update)
{
Update();
}
return(1);
}
示例6: FxHomeCallTimer
func FxHomeCallTimer(object target, proplist fx, int time)
{
if(!master)
{
KillBall();
return -1;
}
if(GetEffect("Blocked", this))
{
ox=GetX();
oy=GetY();
return;
}
DrawParticleLine("Flash", 0, 0, ox-GetX(), oy-GetY(), 1, 0, 0, 15, hometrailparticles);
if(time%7 == 0)
{
for(var i = 0; i < 360; i+=5)
{
CreateParticle("Flash", Sin(i, 3), -Cos(i, 5), 0, 0, 10, hometrailparticles2, 2);
}
}
fx.x = master->GetX();
fx.y = master->GetY();
var angle = Angle(GetX(), GetY(), fx.x, fx.y, 10);
var txdir = Sin(angle, Speed + 12, 10);
var tydir = -Cos(angle, Speed + 12, 10);
SetXDir((GetXDir() + (txdir - GetXDir())/2));
SetYDir((GetYDir() + (tydir - GetYDir())/2));
CheckForEnemies(HomeCallSize);
ox=GetX();
oy=GetY();
var dst = Distance(GetX(), GetY(), fx.x, fx.y);
if(dst < 8)
{
AddShield(master);
Sound("Ball::ball_shield", false, 20);
var particles =
{
Prototype = Particles_Glimmer(),
R = pR,
G = pG,
B = pB,
Alpha = 255,
Size = PV_Linear(10, 0),
OnCollision = PC_Bounce(),
};
CreateParticle("StarSpark", 0, 0, PV_Random(-60,60), PV_Random(-60, 60), 25, particles, 5);
var particle =
{
Alpha = PV_Linear(255, 0),
Size = 50,
R = pR,
G = pG,
B = pB,
BlitMode = GFX_BLIT_Additive,
};
master->CreateParticle("StarSpark", 0, 0, 0, 0, 7, particle, 4);
FollowMaster();
return -1;
}
}