Added AsloEngine 0.9.0 to Repository
This commit is contained in:
parent
d017dd84b3
commit
881e6c70f2
60 changed files with 2648 additions and 0 deletions
32
asloengine/builtin/headers/grid_container.hpp
Executable file
32
asloengine/builtin/headers/grid_container.hpp
Executable file
|
|
@ -0,0 +1,32 @@
|
|||
#pragma once
|
||||
|
||||
#include "../../headers/gameobject.hpp"
|
||||
|
||||
namespace asloengine
|
||||
{
|
||||
|
||||
class GridContainer : public GameObject
|
||||
{
|
||||
|
||||
public:
|
||||
std::vector<GameObject *> objects;
|
||||
bool needs_clean = false;
|
||||
sf::Vector2u grid_size;
|
||||
sf::Vector2f cell_size;
|
||||
|
||||
GridContainer(sf::String _name, sf::Vector2u _grid_size = sf::Vector2u(0, 0), sf::Vector2f _cell_size = sf::Vector2f(0, 0));
|
||||
virtual ~GridContainer() override;
|
||||
|
||||
virtual void update_positions();
|
||||
virtual void add_object(GameObject *object);
|
||||
virtual void remove_object(int index);
|
||||
|
||||
virtual void draw() override;
|
||||
virtual void on_start() override;
|
||||
virtual void on_update(float delta_time) override;
|
||||
virtual void clean();
|
||||
virtual void on_destroy() override;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue