12345678910111213141516171819202122232425262728293031323334353637 |
- //
- // Created by jovian on 18/07/17.
- //
- #ifndef TINYSHOOTER_TINYWORLD_H
- #define TINYSHOOTER_TINYWORLD_H
- #include <box2d/box2d.h>
- #include <list>
- #include "../Graphics/Visual.h"
- #include "Entity.h"
- class TinyWorld : public b2World {
- public:
- TinyWorld(const b2Vec2 &gravity);
- // Build a procedural world
- void createProceduralWorld();
- // Add entity in physic world
- void addEntity(Entity *newcomer);
- // Delete every entity, be careful with your pointers !!!
- void clearEveryEntity();
- // Update every entity and make a cleanup : be careful with pointers !
- void updateAll();
- // Detect visuals in desired area
- void collectVisuals(std::vector<Visual*> &scope, b2Vec2 center, b2Vec2 diago);
- protected:
- std::list<Entity*> m_entities; // Store every entity
- };
- #endif //TINYSHOOTER_TINYWORLD_H
|