GameObject.h 570 B

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