1234567891011121314151617181920212223242526272829303132333435 |
- #pragma once
- #include "Variablen.h"
- enum Richtung
- {
- OBEN,
- RECHTS,
- UNTEN,
- LINKS,
- MITTE
- };
- Richtung invert( Richtung r );
- Richtung getRichtungFromString( Text str );
- class GameObject : public Variable
- {
- protected:
- float x, y, w, h;
- public:
- GameObject( VariableTyp typ, int x, int y, int width, int height );
- void setX( float x );
- void setY( float y );
- void setWidth( float width );
- void setHeight( float height );
- bool intersectsWith( GameObject *zObj );
- float getX() const;
- float getY() const;
- float getWidth() const;
- float getHeight() const;
- float abstandZu( GameObject *zObj );
- };
|