18 #ifndef HEADER_SUPERTUX_WORLDMAP_WORLDMAP_OBJECT_HPP 19 #define HEADER_SUPERTUX_WORLDMAP_WORLDMAP_OBJECT_HPP 21 #include "object/moving_sprite.hpp" 23 #include "math/vector.hpp" 33 static bool in_worldmap();
38 WorldMapObject(
const Vector& pos,
const std::string& default_sprite);
41 static std::string class_name() {
return "worldmap-object"; }
42 virtual std::string get_class_name()
const override {
return class_name(); }
49 void update(
float)
override;
53 virtual void move_to(
const Vector& pos)
override;
55 Vector get_tile_pos()
const {
return { m_tile_x, m_tile_y }; }
virtual void draw_worldmap(DrawingContext &context)
Draws the object, when on a worldmap.
Definition: worldmap_object.cpp:93
void draw(DrawingContext &context) override
The GameObject should draw itself onto the provided DrawingContext if this function is called...
Definition: worldmap_object.cpp:84
Definition: worldmap_object.hpp:30
Definition: object_settings.hpp:39
void update(float) override
This function is called once per frame and allows the object to update it's state.
Definition: worldmap_object.cpp:110
Definition: object_settings.hpp:32
virtual GameObjectClasses get_class_types() const override
List notable classes in inheritance hierarchy of class.
Definition: moving_sprite.hpp:60
This class is responsible for: Updating and drawing the object.
Definition: game_object.hpp:83
virtual HitResponse collision(GameObject &other, const CollisionHit &hit) override
this function is called when the object collided with any other object
Definition: worldmap_object.hpp:51
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
virtual GameObjectClasses get_class_types() const override
List notable classes in inheritance hierarchy of class.
Definition: worldmap_object.hpp:39
Definition: reader_mapping.hpp:32
Abstract base class for ""MovingObject""s, that are represented by a sprite.
Definition: moving_sprite.hpp:33
This class provides functions for drawing things on screen.
Definition: drawing_context.hpp:42
This class collects data about a collision.
Definition: collision_hit.hpp:44