本文整理汇总了C++中Projectile::SetWeaponDamage方法的典型用法代码示例。如果您正苦于以下问题:C++ Projectile::SetWeaponDamage方法的具体用法?C++ Projectile::SetWeaponDamage怎么用?C++ Projectile::SetWeaponDamage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Projectile
的用法示例。
在下文中一共展示了Projectile::SetWeaponDamage方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: processAttack
/*HPTRect &EnemyGMonsterSpit::GetWorldLoc()
{
return rectWorldLoc;
}
*/
void EnemyGMonsterSpit::processAttack()
{
if(!ipFlags.S_ATTACK && !ipFlags.S_DAMAGED && !ipFlags.S_DEAD)
{
// if (ipFlags.S_ACTIVE) soundPlayer->PlaySound(swoosh00);
ipFlags.S_ATTACK = true;
SetAnimation(ENEMY_SPIT_MONSTER_ATTACK, 0, true, true, 10, true);
Projectile *temp;
/* Create Ninja Star Projectile */
if(ipFlags.S_DIRECTION)
{
//temp = new ProjectileGMonsterSpit(ipFlags.S_DIRECTION, static_cast<int>(xLoc + nOffSet + 5), static_cast<int>(yLoc));
//temp = new ProjectileAGMSpit(false, static_cast<int>(xLoc-20 + nOffSet), static_cast<int>(yLoc - 15),*projectile_list,m_player->GetXLoc());
temp = new ProjectileAGMSpit(ipFlags.S_DIRECTION, static_cast<int>(xLoc + nOffSet + 20), static_cast<int>(yLoc+15),*projectile_list,m_player->GetXLoc());
temp->SetWeaponDamage(5);
}
else
{
//temp = new ProjectileGMonsterSpit(ipFlags.S_DIRECTION, static_cast<int>(xLoc - nOffSet - 5), static_cast<int>(yLoc));
//temp = new ProjectileAGMSpit(false, static_cast<int>(xLoc-20 + nOffSet), static_cast<int>(yLoc - 15),*projectile_list,m_player->GetXLoc());
temp = new ProjectileAGMSpit(ipFlags.S_DIRECTION, static_cast<int>(xLoc - nOffSet - 20), static_cast<int>(yLoc+15),*projectile_list,m_player->GetXLoc());
temp->SetWeaponDamage(5);
}
(*projectile_list).push_back(temp);
}
}
示例2: processAttack
void EnemyShadowElitePistol::processAttack()
{
if(!ipFlags.S_ATTACK)
{
ipFlags.S_ATTACK = true;
switch(ipFlags.nCurrAttack)
{
case 0:
case 1:
SetAnimation(ENEMY_PISTOL_ELITE_GUARD_ANIM_PISTOL_ATTACK, 0, true, true, 20, true);
Projectile *temp;
if(ipFlags.S_DIRECTION)
{
temp = new ProjectileEliteGuardPistolBullet(ipFlags.S_DIRECTION, static_cast<int>(xLoc + nxOffSet + 16), static_cast<int>(yLoc -9 ));
temp->SetWeaponDamage(8);
}
else
{
temp = new ProjectileEliteGuardPistolBullet(ipFlags.S_DIRECTION, static_cast<int>(xLoc - nxOffSet - 16), static_cast<int>(yLoc -9 ));
temp->SetWeaponDamage(8);
}
(*projectile_list).push_back(temp);
ipFlags.S_ATTACK = true;
//Stop All Directional Movement
velMovement = 0;
velModifier = 0;
if (ipFlags.S_ACTIVE) soundPlayer->PlaySound(colt45);
break;
default:
ipFlags.S_ATTACK = false;
break;
}
}
}