1
SFML projects / Re: Squid Blaster
« on: March 21, 2016, 11:26:18 pm »
Ah, you found the bottom to top thing. That does make the game a lot easier, I'm working on a way to fix it, but I need to keep it for now because every minute, one squid is added to the wave's "weak spot", so after ten minutes the game would become impossible without bottom to top teleportation.
Whoops, I guess I wasn't clear on the hovering bit. I mean the turtle has to touch the fish for a few seconds. I'll update the readme. Thank you for bringing this to my attention!
And thanks for the example graphics. I'll see what I can do.
Huh. I wasn't using the image boundaries for the turtle's bounding box, so it must be something else. Here's my code:
Whoops, I guess I wasn't clear on the hovering bit. I mean the turtle has to touch the fish for a few seconds. I'll update the readme. Thank you for bringing this to my attention!
And thanks for the example graphics. I'll see what I can do.
Huh. I wasn't using the image boundaries for the turtle's bounding box, so it must be something else. Here's my code:
switch (this->direction)
{
case UP:
this->bounds = FloatRect(this->sprite.getPosition().x - 21, this->sprite.getPosition().y - 31, 40, 52);
break;
case DOWN:
this->bounds = FloatRect(this->sprite.getPosition().x - 19, this->sprite.getPosition().y - 21, 40, 52);
break;
case LEFT:
this->bounds = FloatRect(this->sprite.getPosition().x - 31, this->sprite.getPosition().y - 19, 52, 40);
break;
case RIGHT:
this->bounds = FloatRect(this->sprite.getPosition().x - 21, this->sprite.getPosition().y - 21, 52, 40);
break;
};
{
case UP:
this->bounds = FloatRect(this->sprite.getPosition().x - 21, this->sprite.getPosition().y - 31, 40, 52);
break;
case DOWN:
this->bounds = FloatRect(this->sprite.getPosition().x - 19, this->sprite.getPosition().y - 21, 40, 52);
break;
case LEFT:
this->bounds = FloatRect(this->sprite.getPosition().x - 31, this->sprite.getPosition().y - 19, 52, 40);
break;
case RIGHT:
this->bounds = FloatRect(this->sprite.getPosition().x - 21, this->sprite.getPosition().y - 21, 52, 40);
break;
};