17 #ifndef HEADER_SUPERTUX_OBJECT_SHARD_HPP 18 #define HEADER_SUPERTUX_OBJECT_SHARD_HPP 20 #include "object/sticky_object.hpp" 21 #include "supertux/physic.hpp" 22 #include "supertux/timer.hpp" 28 Shard(
const Vector& pos,
const Vector& velocity,
const std::string& sprite =
"images/creatures/crystallo/shard.sprite");
30 virtual void update(
float dt_sec)
override;
33 static std::string class_name() {
return "shard"; }
34 virtual std::string get_class_name()
const override {
return class_name(); }
35 static std::string display_name() {
return _(
"Shard"); }
virtual std::string get_display_name() const override
Returns the display name of the object, translated to the user's locale.
Definition: shard.hpp:36
virtual HitResponse collision(GameObject &other, const CollisionHit &hit) override
this function is called when the object collided with any other object
Definition: shard.cpp:76
Physics engine.
Definition: physic.hpp:27
virtual void update(float dt_sec) override
This function is called once per frame and allows the object to update it's state.
Definition: shard.cpp:48
This class is responsible for: Updating and drawing the object.
Definition: game_object.hpp:83
virtual void collision_solid(const CollisionHit &hit) override
this function is called when the object collided with something solid
Definition: shard.cpp:63
virtual GameObjectClasses get_class_types() const override
List notable classes in inheritance hierarchy of class.
Definition: sticky_object.hpp:34
A helper structure to list all the type_indexes of the classes in the type hierarchy of a given class...
Definition: game_object.hpp:57
Simple timer designed to be used in the update functions of objects.
Definition: timer.hpp:24
Definition: reader_mapping.hpp:32
This is a class for MovingSprites that can stick to the sides, top and bottom of MovingObjects, such as platforms, fallblock, tilemap, etc.
Definition: sticky_object.hpp:27
virtual GameObjectClasses get_class_types() const override
List notable classes in inheritance hierarchy of class.
Definition: shard.hpp:37
This class collects data about a collision.
Definition: collision_hit.hpp:44