-
Notifications
You must be signed in to change notification settings - Fork 0
/
SRenderSystem.h
40 lines (34 loc) · 1.25 KB
/
SRenderSystem.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ifndef SRENDERSYSTEM_H
#define SRENDERSYSTEM_H
#include <lf/Lightfeather.h>
#include "entityx.h"
#include "events.h"
#include "components.h"
#include "SSoundSystem.h"
using namespace lf;
using namespace entityx;
struct SRenderSystem : public System<SRenderSystem>, Receiver<SRenderSystem> ,input::IKeyListener, input::IMouseListener
{
public:
SRenderSystem();
virtual ~SRenderSystem();
void configure(entityx::ptr<EventManager> event_manager);
void receive(const PositionChangedEvent &poschange);
void receive(const ComponentAddedEvent<ModelComponent> &modelcomponent);
void receive(const ComponentAddedEvent<CameraComponent> &cameracomponent);
void receive(const ComponentAddedEvent<PlayerComponent> &playercomponent);
void receive(const ComponentAddedEvent<LightComponent> &lightcomponent);
void update(entityx::ptr<EntityManager> es, entityx::ptr<EventManager> events, double dt);
void setup2D();
void setupScene();
void keyPressed(input::CKeyEvent& event);
void mouseClicked(input::CMouseEvent& event);
entityx::ptr<EventManager> events;
render::IRenderWindow *rwin;
scene::CScene *scn;
scene::C3DCamera *cam;
scene::CLight *light;
u32 lastFPS;
u32 lastPolyCount;
};
#endif // SRENDERSYSTEM_H