MFC飞机大战编码怎样降低BOSS出现的频率
staticintbossCreator=rand()%30+3;if(bossCreator<=0){bossCreator=rand()%30+3;m_ObjList...
static int bossCreator = rand() % 30 + 3;
if (bossCreator <= 0)
{
bossCreator = rand() % 30 + 3;
m_ObjList[enBOSS].AddTail(new CBOSS);
}
bossCreator--;
要让boss只出现1~3个,这个bossCreator设置为多少好? 展开
if (bossCreator <= 0)
{
bossCreator = rand() % 30 + 3;
m_ObjList[enBOSS].AddTail(new CBOSS);
}
bossCreator--;
要让boss只出现1~3个,这个bossCreator设置为多少好? 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询