Working on a messaging system for sf events

This commit is contained in:
MitchellHansen
2017-01-10 08:46:12 -08:00
parent 475a879b51
commit 3c91614f45
10 changed files with 249 additions and 29 deletions

View File

@@ -2,8 +2,9 @@
#include <SFML/System/Vector3.hpp>
#include <SFML/System/Vector2.hpp>
#include "util.hpp"
#include "Pub_Sub.hpp"
class Camera {
class Camera : public SfEventSubscriber{
public:
enum DIRECTION { FORWARD, REARWARD, LEFT, RIGHT, UP, DOWN };
@@ -33,6 +34,9 @@ public:
sf::Vector3f get_position();
sf::Vector2f get_direction();
virtual void update(SfEventPublisher* p, sf::Event e) override;
private:
float friction_coefficient = 0.1f;