From 86e7da230382e3874e8d90809719b81928f3a1df Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Thu, 13 Sep 2012 14:35:04 +0200 Subject: [PATCH] Changed Player, Enemy and Bullet to use circle for collision model. --- source/effects/Bullet.cpp | 2 +- source/sprite/Enemy.cpp | 2 +- source/sprite/Player.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source/effects/Bullet.cpp b/source/effects/Bullet.cpp index 99db61c..3c5c19b 100755 --- a/source/effects/Bullet.cpp +++ b/source/effects/Bullet.cpp @@ -23,7 +23,7 @@ const float Bullet::SPEED = 500.0f; Bullet::Bullet(const Vector2f& position, b2World& world, const std::shared_ptr& 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); diff --git a/source/sprite/Enemy.cpp b/source/sprite/Enemy.cpp index 2ce5aa7..b061231 100644 --- a/source/sprite/Enemy.cpp +++ b/source/sprite/Enemy.cpp @@ -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) { } diff --git a/source/sprite/Player.cpp b/source/sprite/Player.cpp index 22203d2..1541f27 100644 --- a/source/sprite/Player.cpp +++ b/source/sprite/Player.cpp @@ -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)),