]> git.tdb.fi Git - libs/game.git/blob - examples/bassteroids/source/playercontroller.h
Add a controllable player ship to Bassteroids
[libs/game.git] / examples / bassteroids / source / playercontroller.h
1 #ifndef PLAYERCONTROLLER_H_
2 #define PLAYERCONTROLLER_H_
3
4 #include <msp/game/eventobserver.h>
5 #include <msp/game/owned.h>
6 #include <msp/game/system.h>
7 #include "ship.h"
8
9 class Controls;
10
11 class PlayerController: public Msp::Game::System
12 {
13 private:
14         Controls *controls = nullptr;
15         ShipSetup player_setup;
16         Msp::Game::Owned<Ship> player_ship;
17
18 public:
19         PlayerController(Msp::Game::Stage &);
20
21         void set_controls(Controls *);
22
23         void tick(Msp::Time::TimeDelta) override;
24 };
25
26 #endif