Changed Player, Enemy and Bullet to use circle for collision model.
This commit is contained in:
parent
2f8e91c3b7
commit
86e7da2303
3 changed files with 3 additions and 3 deletions
|
@ -23,7 +23,7 @@ const float Bullet::SPEED = 500.0f;
|
|||
Bullet::Bullet(const Vector2f& position, b2World& world,
|
||||
const std::shared_ptr<sf::Texture>& texture, Physical& shooter, float direction, int damage) :
|
||||
Particle(texture, PhysicalData(position, SIZE, world, CATEGORY_PARTICLE,
|
||||
CATEGORY_PARTICLE, true, true)),
|
||||
CATEGORY_PARTICLE, true, true, true)),
|
||||
mShooter(shooter),
|
||||
mDamage(damage) {
|
||||
setSpeed(angle(direction), SPEED);
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
Enemy::Enemy(b2World& world, const Vector2f& position) :
|
||||
Sprite("enemy.png", PhysicalData(position, Vector2i(50, 50), world,
|
||||
CATEGORY_ACTOR, MASK_ALL, true)),
|
||||
CATEGORY_ACTOR, MASK_ALL, true, false, true)),
|
||||
Actor(100) {
|
||||
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ const Vector2i Player::SIZE = Vector2i(50, 50);
|
|||
*/
|
||||
Player::Player(b2World& world, Collection& collection, const Vector2f& position) :
|
||||
Sprite("player.png", PhysicalData(position, SIZE, world,
|
||||
CATEGORY_ACTOR, MASK_ALL, true)),
|
||||
CATEGORY_ACTOR, MASK_ALL, true, false, true)),
|
||||
Actor(100),
|
||||
mWeapon(*this, collection, world, SIZE),
|
||||
mDestination(Vector2i(position)),
|
||||
|
|
Reference in a new issue