79 int getSlowdown()
const;
91 int draw(
int frame_number,
Vector position,
char transparency)
const;
int m_slowdown
Animation slowdown (1 = no slowdown, 0 = stop).
Definition: Sprite.h:25
Sprite()
Sprite always has one arg, the frame count.
void setWidth(int new_width)
Set width of sprite.
Frame * m_frame
Array of frames.
Definition: Sprite.h:27
std::string m_label
Text label to identify sprite.
Definition: Sprite.h:28
int getFrameCount() const
Get total count of frames in sprite.
int m_width
Sprite width.
Definition: Sprite.h:20
void setLabel(std::string new_label)
Set label associated with sprite.
std::string toString() const
Return attributes as string.
Color m_color
Optional color for entire sprite.
Definition: Sprite.h:24
void setSlowdown(int new_sprite_slowdown)
Set animation slowdown value.
char getTransparency() const
Get Sprite transparency character (0 means none).
int m_max_frame_count
Maximum number of frames sprite can have.
Definition: Sprite.h:22
void setColor(Color new_color)
Set sprite color.
void setHeight(int new_height)
Set height of sprite.
std::string getLabel() const
Get label associated with sprite.
int getHeight() const
Get height of sprite.
int draw(int frame_number, Vector position, char transparency) const
Draw indicated frame centered at position (x,y).
int m_height
Sprite height.
Definition: Sprite.h:21
~Sprite()
Delete sprite, removing any allocated frames.
char m_transparency
Sprite transparent character (0 if none).
Definition: Sprite.h:26
int getWidth() const
Get width of sprite.
Color getColor() const
Get sprite color.
Sprite(int max_frames)
Create sprite with indicated maximum number of frames.
void setTransparency(char new_transparency)
Set Sprite transparency character (0 means none).
Frame getFrame(int frame_number) const
Get next sprite frame indicated by number.
int addFrame(Frame new_frame)
Add frame to sprite.
int m_frame_count
Actual number of frames sprite has.
Definition: Sprite.h:23
An animation for a sprite.
Definition: Animation.h:15
Color
Colors Dragonfly recognizes.
Definition: Color.h:11