Enemy.h 605 B

12345678910111213141516171819202122232425262728293031323334
  1. #pragma once
  2. #include "Entity.h"
  3. #include <string>
  4. #include "Vector.h"
  5. #include "CrystalPoint.h"
  6. class Enemy : public Entity
  7. {
  8. public:
  9. Enemy(const std::string &fileName, const std::string &fileMusic, float damage, float health, const Vec3f &position, const Vec3f &rotation, const float &scale);
  10. ~Enemy();
  11. Sound* music;
  12. bool hasTarget;
  13. Vec3f target;
  14. float speed,radius;
  15. float health;
  16. float damage;
  17. int xp;
  18. bool canAttack;
  19. float lastAttacked;
  20. bool attack();
  21. void update(float);
  22. void draw();
  23. void inEyeSight(Vec3f &);
  24. void collide(const Entity *entity);
  25. private:
  26. int hit_sound_id;
  27. };