GameObject.h 632 B

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