GameObject.h 510 B

1234567891011121314151617181920212223242526272829
  1. #pragma once
  2. #include "Variablen.h"
  3. enum Richtung
  4. {
  5. OBEN,
  6. RECHTS,
  7. UNTEN,
  8. LINKS
  9. };
  10. class GameObject : public Variable
  11. {
  12. protected:
  13. float x, y, w, h;
  14. public:
  15. GameObject( VariableTyp typ, int x, int y, int width, int height );
  16. void setX( int x );
  17. void setY( int y );
  18. void setWidth( int width );
  19. void setHeight( int height );
  20. bool intersectsWith( GameObject *zObj );
  21. int getX() const;
  22. int getY() const;
  23. int getWidth() const;
  24. int getHeight() const;
  25. };