GameObject.h 658 B

12345678910111213141516171819202122232425262728293031
  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. public:
  12. GameObject( VariableTyp typ, int x, int y, int width, int height );
  13. virtual ~GameObject();
  14. void setX( float x );
  15. void setY( float y );
  16. void setWidth( float width );
  17. void setHeight( float height );
  18. bool intersectsWith( GameObject *zObj );
  19. virtual void render( Bild &rObj );
  20. float getX() const;
  21. float getY() const;
  22. float getWidth() const;
  23. float getHeight() const;
  24. float abstandZu( GameObject *zObj );
  25. };