X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fsector.hpp;h=9c5ab6a7129e357ebf92c85f46948347f432bb03;hb=89c801d4e00a0be36f6ad693a055505968ef9514;hp=1fc487ea0b3486c9efcfc2d0f433220b2ef32d86;hpb=7c579d3ef0a6667c18b53dad84c63c05d2760a84;p=supertux.git diff --git a/src/sector.hpp b/src/sector.hpp index 1fc487ea0..9c5ab6a71 100644 --- a/src/sector.hpp +++ b/src/sector.hpp @@ -23,6 +23,7 @@ #include #include #include +#include #include "direction.hpp" #include "video/color.hpp" @@ -59,8 +60,9 @@ enum MusicType { }; /** - * This class holds a sector (a part of a level) and all the game objects in - * the sector + * Represents one of (potentially) multiple, separate parts of a Level. + * + * Sectors contain GameObjects, e.g. Badguys and Players. */ class Sector : public Scripting::SSector { @@ -77,7 +79,7 @@ public: /// write sector to lisp file void write(lisp::Writer& writer); - /// activates this sector (change music, intialize player class, ...) + /// activates this sector (change music, initialize player class, ...) void activate(const std::string& spawnpoint); void activate(const Vector& player_pos); void deactivate(); @@ -191,6 +193,11 @@ public: float get_ambient_green(); float get_ambient_blue(); + /** + * set gravity throughout sector + */ + void set_gravity(float gravity); + private: Level* level; /**< Parent level containing this sector */ uint32_t collision_tile_attributes(const Rect& dest) const;