boss.hpp 738 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /* This file is part of Invaders.
  2. *
  3. * Copyright (C) 2020 LCM.
  4. * You may use, distribute and modify Invaders under the terms of the
  5. * GPLv3 license, available at <https://www.gnu.org/licenses/\>.
  6. */
  7. #ifndef _boss_hpp
  8. #define _boss_hpp
  9. #include "enemy.hpp"
  10. #include "pic.hpp"
  11. #include <cstring>
  12. typedef std::list<bullet> b_list;
  13. class boss: public enemy, public pic
  14. {
  15. public:
  16. boss() { id=16; alive=false; }
  17. boss(int x, int y, int life, int w, int h, std::string newname); //id is automatically set to 16, alive set to FALSE
  18. void next_pos();
  19. //inheriting direction from enemy
  20. int health,healthmax;
  21. std::string name;
  22. void set_life(int);
  23. void shoot(std::list<bullet> & bullets);
  24. boss& operator=(boss&);
  25. };
  26. #endif