cardCharSelect.h 709 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #ifndef _CARDCHARSELECT_
  2. #define _CARDCHARSELECT_
  3. #include <vector>
  4. #include "card.h"
  5. #include "brick.h"
  6. #include "bar.h"
  7. #include "string3d.h"
  8. #include "anim.h"
  9. class CardCharSelect: public Card
  10. {
  11. public:
  12. //Card's lifecycle
  13. CardCharSelect(char gIsSurvival);
  14. void input(unsigned char key, bool pressed);
  15. void update();
  16. void draw();
  17. private:
  18. //Bricks
  19. std::vector<Brick> brick;
  20. //Selection
  21. unsigned char prevSel, selection;
  22. Animation sAnim;
  23. //Font
  24. string3d font;
  25. //Bars
  26. Bar health, speed, damage;
  27. //Bar special;
  28. //Characters stats
  29. std::vector<unsigned char> vecHp, vecSp;
  30. //Apply stats of current selection to bars
  31. void statsToBars();
  32. //Data to pass on
  33. char isSurvival;
  34. };
  35. #endif