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
+8 -2
View File
@@ -9,18 +9,24 @@
#include <cmath>
Weapon::Weapon(std::string modelFilename, float scale, Vec3f location, Vec2f rotation,
Weapon::Weapon(std::string name, int damage, Element e, std::string modelFilename, float scale, Vec3f location, Vec2f rotation,
Vec3f offsetPlayer, Vec3f ankerPoint,
Vec2f maxRotation, Vec2f minRotation){
Vec2f maxRotation, Vec2f minRotation,
Vec3f collision){
weaponmodel = Model::load(modelFilename);
rotate(rotation);
move(location);
this->scale = scale;
this->name = name;
this->damage = damage;
this->element = e;
this->offsetPlayer = offsetPlayer;
this->ankerPoint = ankerPoint;
this->maxRotation = maxRotation;
this->minRotation = minRotation;
this->collision = collision;
};
Weapon::~Weapon(){