Weapon.h 894 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. //
  2. // Created by janco on 25-5-16.
  3. //
  4. #ifndef CRYSTALPOINT_WEAPON_H
  5. #define CRYSTALPOINT_WEAPON_H
  6. #include "Vector.h"
  7. #include "Model.h"
  8. #include <string>
  9. class Weapon {
  10. public:
  11. enum Element {FIRE, WATER, EARTH, AIR};
  12. Weapon(std::string name, int damage, Element element, std::string modelFilename, float scale, Vec3f location, Vec2f rotation,
  13. Vec3f offsetPlayer, Vec3f ankerPoint,
  14. Vec2f maxRotation, Vec2f minXRotation,
  15. Vec3f collisionPoint);
  16. ~Weapon();
  17. void draw();
  18. void rotateWeapon(Vec3f rotation);
  19. void rotate(Vec2f rotation);
  20. void move(Vec3f location);
  21. std::string name;
  22. unsigned int damage;
  23. Element element;
  24. Model* weaponmodel;
  25. float scale;
  26. Vec3f position, rotation, rotationWeapon;
  27. Vec3f offsetPlayer, ankerPoint, collisionPoint;
  28. Vec2f maxRotation, minRotation;
  29. };
  30. #endif //CRYSTALPOINT_WEAPON_H