|
|
@@ -15,7 +15,8 @@
|
|
|
|
|
|
using namespace engine;
|
|
|
|
|
|
-scene::scene(std::string const & str) : identity<scene, std::string>(str) {}
|
|
|
+scene::scene(std::string const & str, std::shared_ptr<game_dispatch> dispatch)
|
|
|
+ : identity<scene, std::string>(str), dispatch_(dispatch) {}
|
|
|
|
|
|
scene::~scene() {}
|
|
|
|
|
|
@@ -50,6 +51,10 @@ void scene::check_collisions() {
|
|
|
// }
|
|
|
//}
|
|
|
|
|
|
+graphics::manager const & scene::graphics_manager() const {
|
|
|
+ return dispatch_.lock()->graphics_manager();
|
|
|
+}
|
|
|
+
|
|
|
void scene::handle_key_event(event::key_event evt) {
|
|
|
if (evt.type & event::PRESSED_MASK && evt.key == keys::QUIT) {
|
|
|
dispatch_.lock()->quit();
|