Gegenstand.cpp 698 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #include "Gegenstand.h"
  2. GegenstandTypVar::GegenstandTypVar( GegenstandTyp value )
  3. : Variable( GEGENSTAND_TYP )
  4. {
  5. this->value = value;
  6. }
  7. void GegenstandTypVar::setValue( GegenstandTyp value )
  8. {
  9. this->value = value;
  10. }
  11. GegenstandTyp GegenstandTypVar::getValue() const
  12. {
  13. return value;
  14. }
  15. Gegenstand::Gegenstand( int id, GegenstandTyp typ, bool onMap = 0, int x = 0, int y = 0, int w = 50, int h = 50 )
  16. : GameObject( GEGENSTAND, x, y, w, h )
  17. {
  18. this->id = id;
  19. this->onMap = onMap;
  20. this->typ = typ;
  21. }
  22. int Gegenstand::getId() const
  23. {
  24. return id;
  25. }
  26. GegenstandTyp Gegenstand::getTyp() const
  27. {
  28. return typ;
  29. }
  30. bool Gegenstand::isOnMap() const
  31. {
  32. return onMap;
  33. }