GameObject.h 716 B

123456789101112131415161718192021222324252627282930313233
  1. #pragma once
  2. #include "Variablen.h"
  3. #include <Bild.h>
  4. using namespace Framework;
  5. class GameObject : public Variable
  6. {
  7. protected:
  8. float x, y, w, h;
  9. Bild *textur;
  10. bool texturScale;
  11. bool intersectable;
  12. public:
  13. GameObject( VariableTyp typ, int x, int y, int width, int height );
  14. virtual ~GameObject();
  15. void setX( float x );
  16. void setY( float y );
  17. void setWidth( float width );
  18. void setHeight( float height );
  19. bool intersectsWith( GameObject *zObj );
  20. virtual void render( Bild &rObj );
  21. float getX() const;
  22. float getY() const;
  23. float getWidth() const;
  24. float getHeight() const;
  25. bool isIntersectable() const;
  26. float abstandZu( GameObject *zObj );
  27. };