Load weapons from JSON

This commit is contained in:
2016-06-21 18:25:16 +02:00
parent 4437acb9f2
commit 3025fecf94
7 changed files with 99 additions and 11 deletions
+10 -4
View File
@@ -11,22 +11,28 @@
class Weapon {
public:
Weapon(std::string modelFilename, float scale, Vec3f location, Vec2f rotation,
enum Element {FIRE, WATER, EARTH, AIR};
Weapon(std::string name, int damage, Element element, std::string modelFilename, float scale, Vec3f location, Vec2f rotation,
Vec3f offsetPlayer, Vec3f ankerPoint,
Vec2f maxRotation, Vec2f minXRotation);
Vec2f maxRotation, Vec2f minXRotation,
Vec3f collision);
~Weapon();
void draw();
void rotateWeapon(Vec3f rotation);
void rotate(Vec2f rotation);
void move(Vec3f location);
std::string name;
unsigned int damage;
Element element;
Model* weaponmodel;
float scale;
Vec3f position, rotation, rotationWeapon;
Vec3f offsetPlayer, ankerPoint;
Vec3f offsetPlayer, ankerPoint, collision;
Vec2f maxRotation, minRotation;
};