-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDriver.h
More file actions
36 lines (26 loc) · 741 Bytes
/
Driver.h
File metadata and controls
36 lines (26 loc) · 741 Bytes
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
#pragma once
#include "DriverState.h"
#include "Listener.h"
#include "DriverStateType.h"
#include "SoundPool.h"
class Driver :
public DriverState,
public Listener
{
public:
Driver();
~Driver();
void onEvent(const Event &ev) override;
void update(float deltaTime) override;
void updateOnMouseMove(int mouseX, int mouseY) override;
void updateOnMouseButtonPress(sf::Mouse::Button button) override;
void updateOnKeyPress(sf::Keyboard::Key key) override;
void updateOnKeyRelease(sf::Keyboard::Key key) override;
void draw(sf::RenderTarget &target, sf::RenderStates states) const override;
bool isLive() const;
private:
DriverState *state_;
SoundPool soundPool_;
bool isLive_;
void changeState_(DriverStateType type);
};