17 #ifndef HEADER_SUPERTUX_SUPERTUX_SECTOR_BASE_HPP 18 #define HEADER_SUPERTUX_SUPERTUX_SECTOR_BASE_HPP 20 #include "supertux/game_object_manager.hpp" 22 #include "squirrel/squirrel_environment.hpp" 33 Sector(
const std::string& type);
40 virtual void update(
float dt_sec) = 0;
42 virtual TileSet* get_tileset()
const = 0;
43 virtual bool in_worldmap()
const = 0;
45 void set_name(
const std::string& name) { m_name = name; }
46 const std::string& get_name()
const {
return m_name; }
48 void set_init_script(
const std::string& init_script) { m_init_script = init_script; }
49 void run_script(
const std::string& script,
const std::string& sourcename);
57 std::string m_init_script;
59 std::unique_ptr<SquirrelEnvironment> m_squirrel_environment;
virtual bool before_object_add(GameObject &object) override
Hook that is called before an object is added to the vector.
Definition: sector_base.cpp:45
This class provides basic controlling functions for a sector.
Definition: game_object_manager.hpp:45
virtual void finish_construction(bool editable)
Needs to be called after parsing to finish the construction of the Sector before using it...
Definition: sector_base.cpp:32
A base for sector classes.
Definition: sector_base.hpp:30
Represents a collection of Sectors running in a single GameSession.
Definition: level.hpp:30
This class is responsible for: Updating and drawing the object.
Definition: game_object.hpp:83
virtual void before_object_remove(GameObject &object) override
Hook that is called before an object is removed from the vector.
Definition: sector_base.cpp:52
Definition: sector_base.cpp:22
Definition: tile_set.hpp:44
This class provides functions for drawing things on screen.
Definition: drawing_context.hpp:42