]> git.tdb.fi Git - libs/game.git/blob - source/game/meshsource.h
Use the setup generator to create setup structs
[libs/game.git] / source / game / meshsource.h
1 #ifndef MSP_GAME_MESHSOURCE_H_
2 #define MSP_GAME_MESHSOURCE_H_
3
4 #include <msp/datafile/objectloader.h>
5 #include <msp/game/setups.h>
6 #include "component.h"
7 #include "mspgame_api.h"
8
9 namespace Msp::Game {
10
11 class MSPGAME_API MeshSource: public Component
12 {
13 public:
14         using Setup = MeshSourceSetup;
15
16 private:
17         const Setup &setup;
18
19 public:
20         MeshSource(Handle<Entity> e, const Setup &s): Component(e), setup(s) { }
21
22         const std::string &get_object_name() const { return setup.object_name; }
23 };
24
25 } // namespace Msp::Game
26
27 #endif