GameObject.h 504 B

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