Enemy.h 622 B

123456789101112131415161718192021222324252627282930313233343536
  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 attack;
  19. bool isHit;
  20. void update(float);
  21. void draw();
  22. void inEyeSight(Vec3f &);
  23. void collide(const Entity *entity);
  24. void hit(int damage);
  25. bool isDead(void);
  26. private:
  27. int hit_sound_id;
  28. };