Initial commit

This commit is contained in:
2019-10-06 13:50:52 +02:00
commit 265923231f
44 changed files with 16258 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
#ifndef CREATURELIB_ATTACKLIBRARY_HPP
#define CREATURELIB_ATTACKLIBRARY_HPP
#include <string>
#include <unordered_map>
#include "Attacks/AttackData.hpp"
namespace CreatureLib::Library {
class AttackLibrary {
private:
std::unordered_map<std::string, const AttackData*> _attacks;
public:
AttackLibrary() = default;
~AttackLibrary(){
_attacks.clear();
}
[[nodiscard]] const AttackData* GetAttack(const std::string& name) const;
[[nodiscard]] const AttackData* operator[] (const std::string& name) const;
void LoadAttack(const std::string& name, const AttackData* attack);
void DeleteAttack(const std::string& name);
};
}
#endif //CREATURELIB_ATTACKLIBRARY_HPP