1 #ifndef COLLISION_DATA_H
2 #define COLLISION_DATA_H
3 #include <easylogging++.h>
10 std::vector<std::vector<int>> collision_table;
15 CollisionData(
const unsigned int map_width,
const unsigned int map_height);
17 void setIndexCollidable(
const unsigned int x,
const unsigned int y,
const unsigned int collide_level);
19 unsigned int getWidth()
const noexcept;
22 virtual void onStart()
override;
23 virtual bool onUpdate(
const double delta)
override;
28 virtual std::string
to_string()
const noexcept
override;
29 virtual void log(el::base::type::ostream_t& os)
const override;
virtual bool onUpdate(const double delta) override
Called every engine loop.
Definition: collision_data.cpp:29
Definition: collision_data.h:8
virtual void onDestroy() override
Called when the engine is shutting down.
Definition: collision_data.cpp:33
Base Class for all components.
Definition: component.h:20
int getCollideLevel(const int x, const int y)
Definition: collision_data.cpp:15
virtual void onStart() override
Called when the engine starts and when a new scene is loaded.
Definition: collision_data.cpp:25
void setIndexCollidable(const unsigned int x, const unsigned int y, const unsigned int collide_level)
Definition: collision_data.cpp:11
virtual unsigned long long getValueForSorting() const override
Gets the value for sorting.
Definition: collision_data.cpp:45
unsigned int getWidth() const noexcept
Definition: collision_data.cpp:37
unsigned int getHeight() const noexcept
Definition: collision_data.cpp:41
virtual void log(el::base::type::ostream_t &os) const override
Definition: collision_data.cpp:62
virtual std::string to_string() const noexceptoverride
Returns a string representation of the object.
Definition: collision_data.cpp:49