Enemy.h 544 B

123456789101112131415161718192021222324252627282930313233
  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, 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. int xp;
  16. bool attack;
  17. bool isHit;
  18. void update(float);
  19. void draw();
  20. void inEyeSight(Vec3f &);
  21. void collide(const Entity *entity);
  22. void hit(int damage);
  23. private:
  24. int hit_sound_id;
  25. };