41 lines
No EOL
970 B
C++
Executable file
41 lines
No EOL
970 B
C++
Executable file
#pragma once
|
|
|
|
#include <SFML/Graphics.hpp>
|
|
#include "gameobject.hpp"
|
|
|
|
namespace asloengine
|
|
{
|
|
|
|
typedef std::vector<GameObject *> Layer;
|
|
|
|
class Scene
|
|
{
|
|
|
|
public:
|
|
std::string name = "nonamescene";
|
|
sf::RenderWindow *scene_window;
|
|
std::vector<Layer> layers;
|
|
std::vector<Layer> fixed_layers;
|
|
sf::FloatRect camera_2d_rect;
|
|
bool needs_clean = false;
|
|
|
|
Scene(std::string _name);
|
|
|
|
void draw();
|
|
void load();
|
|
void start(sf::RenderWindow *window);
|
|
void update(float delta_time);
|
|
void clean();
|
|
void destroy();
|
|
|
|
void move_camera(sf::Vector2f _move);
|
|
|
|
// Custom Derived Implementations
|
|
virtual void on_load();
|
|
virtual void on_update(float delta_time);
|
|
virtual void on_post_update(float delta_time);
|
|
virtual void on_destroy();
|
|
|
|
};
|
|
|
|
} |