本文整理汇总了C++中HGE::Effect_Play方法的典型用法代码示例。如果您正苦于以下问题:C++ HGE::Effect_Play方法的具体用法?C++ HGE::Effect_Play怎么用?C++ HGE::Effect_Play使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HGE
的用法示例。
在下文中一共展示了HGE::Effect_Play方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: BornWithNumber
void MUTI_SKILL_MANAGER::BornWithNumber(int number,float x,float y,float angle,int speed,bool lianfa, bool foe1,int damage1)
{
HGE *hge = hgeCreate(HGE_VERSION);
SKILL->born(0, 0, 0, 0);
if (lianfa)
{
SKILL->setCD(5);
lianfale = true;
}
else lianfale = false;
if (number > 1)
{
BASE_ARROW *arrow = new BASE_ARROW[number];
for (int i = 0; i < number; i++)
{
arrow[i].Init(x, y, angle-(i-0.5*number)*0.314, speed, foe1,damage1);// need test
arrows.push_back(arrow[i]);
}
arrow_count += number;
}
else
{
BASE_ARROW *arrow = new BASE_ARROW;
arrow->Init(x, y, angle, speed,foe1,damage1);
arrows.push_back(*arrow);
arrow_count += 1;
}
hge->Effect_Play(SKILL->sound);
arrows.shrink_to_fit();
//arrows.resize(arrow_count);
}
示例2: Render_Alive
void MUTI_SKILL_MANAGER::Render_Alive()
{
HGE* hge = hgeCreate(HGE_VERSION);
for (int i = 0; i != arrows.size(); ++i)
{
if (arrows[i].alive == false)
{
if (arrows[i].boomed == false)
{
MUTIBOOM *boomfish = new MUTIBOOM(boom, arrows[i].x, arrows[i].y, arrows[i].delta);
boomfish->Play();
boom_pool.push_back(*boomfish);
delete boomfish;
boomfish = NULL;
arrows[i].boomed = true;
hge->Effect_Play(effect);
}
}
else
SKILL->render(arrows[i].x, arrows[i].y, arrows[i].angle);
}
for (int i = 0; i < boom_pool.size(); ++i)
{
boom_pool[i].anim->RenderEx(boom_pool[i].GetX(), boom_pool[i].GetY(), 0, boom_pool[i].GetSize(), boom_pool[i].GetSize());
if (boom_pool[i].lifespan<=0)
{
delete boom_pool.cbegin()->anim;
boom_pool.erase(boom_pool.cbegin());
}
}
boom_pool.shrink_to_fit();
}