| 12345678910111213141516171819202122232425262728293031323334353637 |
- //
- // scene.hpp
- // engine
- //
- // Created by Sam Jaffe on 9/2/16.
- //
- #pragma once
- #include <memory>
- #include "engine_fwd.hpp"
- #include "math/math_fwd.hpp"
- #include "math/vector.hpp"
- #include "util/identity.hpp"
- namespace engine {
- class scene : public identity<scene, std::string> {
- public:
- using identity<scene, std::string>::identity;
- virtual ~scene( );
-
- virtual void update( tick );
- virtual void render( );
- virtual void handle_key_event( event::key_event evt );
- virtual void handle_mouse_event( event::mouse_event evt );
-
- math::vec2 get_size( ) const;
- key_binding const & get_binding( ) const;
- protected:
- void change_scene( std::string const & scene_id );
- private:
- math::vec2 local_scene_dimension;
- key_binding keys;
- std::weak_ptr<game_dispatch> dispatch;
- };
- }
|