本文整理汇总了C++中Monster::CDie方法的典型用法代码示例。如果您正苦于以下问题:C++ Monster::CDie方法的具体用法?C++ Monster::CDie怎么用?C++ Monster::CDie使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Monster
的用法示例。
在下文中一共展示了Monster::CDie方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Drawing
void Drawing()
{
int bbx = Squidgee.cx - Player.px;
int bby = Squidgee.cy - Player.py;
if (bbx - bby >= 0)
{
if (bbx == bby && bby <= 0 && bbx <= 0)
{
if (Squidgee.calive == 1)
{
Squidgee.CDraw();
}
else if (Squidgee.calive == 2)
{
Squidgee.CDie();
}
Player.Draw_Character();
}
else
{
Player.Draw_Character();
if (Squidgee.calive == 1)
{
Squidgee.CDraw();
}
else if (Squidgee.calive == 2)
{
Squidgee.CDie();
}
}
}
else
{
if (Squidgee.calive == 1)
{
Squidgee.CDraw();
}
else if (Squidgee.calive == 2)
{
Squidgee.CDie();
}
Player.Draw_Character();
}
}
示例2: Monsters
void Monsters(Monster& Creep, Map& Habitat, int X)
{
if (Creep.calive == 1)
{
Creep.CDamage();
}
if (Creep.calive == 2)
{
Creep.CDie();
}
if (Creep.calive == 0)
{
if (Creep.climit < Habitat.Monster_Stats[X - 1][1])
{
Creep.CSpawn();
Creep.clocation = Habitat.number;
}
}
if (Creep.calive == 0 && Creep.crespawn_count == 0)
{
Creep.crespawn_count = Habitat.Monster_Stats[X - 1][0];
}
if (Creep.calive == 0)
{
if (Creep.crespawn_count == 1)
{
Creep.climit--;
Creep.crespawn_count = 0;
}
else
{
Creep.crespawn_count--;
}
}
if (Creep.calive == 1)
{
Creep.CMove();
}
}