本文整理汇总了C++中Laser::setEnemyLaser方法的典型用法代码示例。如果您正苦于以下问题:C++ Laser::setEnemyLaser方法的具体用法?C++ Laser::setEnemyLaser怎么用?C++ Laser::setEnemyLaser使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Laser
的用法示例。
在下文中一共展示了Laser::setEnemyLaser方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: radians
Player::Player() : radians(PI / 2.0f) {
this->collisionType = entityNS::CIRCLE;
this->mass = playerNS::MASS;
this->radius = playerNS::WIDTH / 2;
this->spriteData.height = playerNS::HEIGHT;
this->spriteData.scale = 1;
this->spriteData.width = playerNS::WIDTH;
this->spriteData.x = playerNS::X;
this->spriteData.y = playerNS::Y;
//Calculate several values regarding the position of the turret ring
this->mirrorRadius = playerNS::HEIGHT / 2 + 10;
this->trueCenterX = playerNS::X + playerNS::WIDTH / 2;
this->trueCenterY = playerNS::Y + playerNS::HEIGHT / 2;
this->turretRadius = playerNS::HEIGHT / 2 + 6;
for(int i = 0; i < playerNS::TOTAL_LASERS; i++)
{
Laser* l = new Laser(graphicsNS::BLUE);
l->setEnemyLaser(false);
lasers[i] = l;
l=0;
}
playerHealth = gladiatorNS::NUM_HEALTH_BARS;
}