Gegenstand.h 983 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. #pragma once
  2. #include "GameObject.h"
  3. #include "Resource.h"
  4. enum GegenstandTyp
  5. {
  6. KEIN_GEGENSTAND,
  7. PFEIL,
  8. LEBEN,
  9. SCHILD,
  10. SCHUH,
  11. GEIST,
  12. KUGEL,
  13. ROLLE,
  14. STURM,
  15. DRACHENAUGE,
  16. FEUERBALL,
  17. ENTERHAKEN,
  18. MINE,
  19. RWEISHEIT,
  20. RSTRENGTH,
  21. RBOSHEIT,
  22. RLEBEN,
  23. RTEMPO,
  24. ITEMANZAHL
  25. };
  26. bool consumable( GegenstandTyp typ );
  27. float abklingzeit( GegenstandTyp typ );
  28. bool storable( GegenstandTyp typ );
  29. bool brauchtRichtung( GegenstandTyp typ );
  30. class GegenstandTypVar : public Variable
  31. {
  32. private:
  33. GegenstandTyp value;
  34. public:
  35. GegenstandTypVar( GegenstandTyp value );
  36. void setValue( GegenstandTyp value );
  37. GegenstandTyp getValue() const;
  38. };
  39. class Gegenstand : public GameObject
  40. {
  41. private:
  42. GegenstandTyp typ;
  43. int id;
  44. public:
  45. Gegenstand( ResourceRegistry *zResources, int id, GegenstandTyp typ, int x = 0, int y = 0, int w = 50, int h = 50 );
  46. int getId() const;
  47. GegenstandTyp getTyp() const;
  48. };