mirror of
https://github.com/ProgramSnail/rts_game_backend.git
synced 2026-01-01 14:28:14 +00:00
some additional functions
This commit is contained in:
parent
8553878b4a
commit
5173f4f2a9
23 changed files with 214 additions and 24 deletions
|
|
@ -0,0 +1,5 @@
|
|||
#include "module_builder.hpp"
|
||||
|
||||
namespace unit {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
#include <string>
|
||||
#include "unit_module.hpp"
|
||||
|
||||
#pragma ONCE
|
||||
|
||||
namespace unit {
|
||||
class ModuleBuilder {
|
||||
private:
|
||||
public:
|
||||
ModuleBuilder();
|
||||
Module create();
|
||||
void config(const std::string& file);
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
// include all modules from folder
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
#include "unit.hpp"
|
||||
|
||||
namespace unit {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
#include <vector>
|
||||
#include "unit_module.hpp"
|
||||
#include "unit_memory_elem.hpp"
|
||||
|
||||
#pragma ONCE
|
||||
|
||||
namespace unit {
|
||||
class Unit {
|
||||
private:
|
||||
std::vector<Module> modules;
|
||||
std::vector<MemoryElem> memory;
|
||||
public:
|
||||
Unit();
|
||||
};
|
||||
}
|
||||
7
src/game/unit/unit_memory_elem.hpp
Normal file
7
src/game/unit/unit_memory_elem.hpp
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
#pragma ONCE
|
||||
|
||||
namespace unit {
|
||||
struct MemoryElem {
|
||||
int value = 0;
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
#include "unit_module.hpp"
|
||||
|
||||
namespace unit {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
// #include "unit.hpp" // ??
|
||||
|
||||
#pragma ONCE
|
||||
|
||||
namespace unit {
|
||||
class Module {
|
||||
private:
|
||||
public:
|
||||
Module();
|
||||
/*virtual void connect(Unit* unit) {
|
||||
|
||||
}
|
||||
virtual void disconnect(Unit* unit) {
|
||||
|
||||
}*/
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue