mirror of
https://github.com/Nimac0/SDL_Minigame
synced 2026-01-12 15:53:42 +00:00
Removed debug print, added TODO comment
This commit is contained in:
parent
6a2e8289f6
commit
ae54dd3158
@ -6,7 +6,7 @@
|
|||||||
class TransformComponent : public Component
|
class TransformComponent : public Component
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Vector2D position;
|
Vector2D position; // TODO: change to int to safe CPU time -> possibly subpixel coordinates
|
||||||
Vector2D direction;
|
Vector2D direction;
|
||||||
|
|
||||||
int height = 32;
|
int height = 32;
|
||||||
|
|||||||
@ -24,12 +24,10 @@ void ProjectileComponent::update()
|
|||||||
|
|
||||||
if ((boundsIntersection | IntersectionBitSet("1100")).all() || (boundsIntersection | IntersectionBitSet("0011")).all()) {
|
if ((boundsIntersection | IntersectionBitSet("1100")).all() || (boundsIntersection | IntersectionBitSet("0011")).all()) {
|
||||||
this->entity->destroy();
|
this->entity->destroy();
|
||||||
std::cout << "out of bounds" << std::endl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (distance > range) {
|
if (distance > range) {
|
||||||
this->entity->destroy();
|
this->entity->destroy();
|
||||||
std::cout << "out of range" << std::endl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Entity* player;
|
Entity* player;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user