SDLPP: add constant rotation
This commit is contained in:
@@ -131,10 +131,16 @@ public:
|
||||
void setRotationCenter( const Vec2D< double > ¢er );
|
||||
void rotateClockwise( int angle );
|
||||
void rotateCounterClockwise( int angle );
|
||||
void setRotationSpeed(int speed);
|
||||
void startRotation();
|
||||
void stopRotation();
|
||||
|
||||
protected:
|
||||
virtual void copyTo( std::shared_ptr< RenderObject > other );
|
||||
bool entireTexture();
|
||||
bool isRotating() {
|
||||
return rotating;
|
||||
}
|
||||
std::vector< std::shared_ptr< CollisionPolygon > > collisions;
|
||||
std::shared_ptr< Texture > texture;
|
||||
std::shared_ptr< Texture > cur_texture;
|
||||
@@ -164,6 +170,8 @@ protected:
|
||||
Vec2D< double > rotation_center = { -1, -1 };
|
||||
SDL_Point rotation_center_point;
|
||||
int rotation_angle = 0;
|
||||
int rotation_speed = 720;
|
||||
bool rotating = false;
|
||||
|
||||
private:
|
||||
friend Scene;
|
||||
|
||||
Reference in New Issue
Block a user