]> git.tdb.fi Git - libs/game.git/blob - examples/bassteroids/source/bassteroids.h
Load the various setups through resources
[libs/game.git] / examples / bassteroids / source / bassteroids.h
1 #ifndef BASSTEROIDS_H_
2 #define BASSTEROIDS_H_
3
4 #include <msp/game/camera.h>
5 #include <msp/game/owned.h>
6 #include <msp/game/resources.h>
7 #include <msp/gameview/application.h>
8 #include <msp/gameview/resources.h>
9 #include "playfield.h"
10
11 class PlayerController;
12
13 class BassteroidsResources: public Msp::Game::ApplicationResources, public Msp::GameView::Resources
14 {
15 public:
16         BassteroidsResources();
17 };
18
19 class Bassteroids: public Msp::GameView::Application<Bassteroids, BassteroidsResources>
20 {
21 private:
22         Msp::Game::EventObserver event_observer;
23         Msp::Game::Stage &game_stage;
24
25         PlayfieldSetup pf_setup;
26         Msp::Game::Owned<Playfield> playfield;
27         PlayerController *player_controller = nullptr;
28
29         Msp::Game::Owned<Msp::Game::Entity> cam_entity;
30         Msp::Game::Owned<Msp::Game::Camera> camera;
31
32 public:
33         Bassteroids(int, char **);
34
35 private:
36         void player_arrived(const Msp::GameView::Events::PlayerArrived &);
37 };
38
39 #endif