Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - bdaddy

Pages: [1]
1
SFML projects / Re: 'Tiled' Tile-map Loader
« on: October 27, 2015, 01:02:50 am »
Hi guys,

I have everything working for my game project, but for some reason; whenever I place a collision box in the TILED editor; my program only picks up one collision box and does not recognize the rest.
Here is my current code:

Quote
      for (auto layer = ml.GetLayers().begin(); layer != ml.GetLayers().end(); ++layer)
      {
         if (layer->name == "Collision")
         {
            for (auto object = layer->objects.begin(); object != layer->objects.end(); ++object)
            {
               collision = object->Contains(sf::Vector2f(actorPlayer.getPosition()));
            }
         }
      }

Is there something I'm missing?

Thank you in advance for your time.

Pages: [1]