#include <imagesprite.h>
Definition at line 32 of file imagesprite.h.
◆ ImageSprite()
ImageSprite::ImageSprite |
( |
Image *const |
image | ) |
|
|
explicit |
◆ ~ImageSprite()
ImageSprite::~ImageSprite |
( |
| ) |
|
◆ draw()
void ImageSprite::draw |
( |
Graphics *const |
graphics, |
|
|
const int |
posX, |
|
|
const int |
posY |
|
) |
| const |
|
virtual |
Draw the current animation frame at the coordinates given in screen pixels.
Implements Sprite.
Definition at line 52 of file imagesprite.cpp.
virtual void setAlpha(float alpha)
void drawImage(const Image *restrict const image, int dstX, int dstY) restrict2 override final
#define FUNC_BLOCK(name, id)
References Graphics::drawImage(), FUNC_BLOCK, Sprite::mAlpha, and mImage.
◆ getCurrentFrame()
unsigned int ImageSprite::getCurrentFrame |
( |
| ) |
const |
|
inlinevirtual |
Returns the current frame number for the sprite.
Implements Sprite.
Definition at line 70 of file imagesprite.h.
◆ getFrameCount()
unsigned int ImageSprite::getFrameCount |
( |
| ) |
const |
|
inlinevirtual |
◆ getHeight()
int ImageSprite::getHeight |
( |
| ) |
const |
|
inlinevirtual |
Gets the height in pixels of the image of the current frame
Implements Sprite.
Definition at line 57 of file imagesprite.h.
References mImage.
◆ getImage()
const Image* ImageSprite::getImage |
( |
| ) |
const |
|
inlinevirtual |
Returns a reference to the current image being drawn.
Implements Sprite.
Definition at line 60 of file imagesprite.h.
References mImage.
◆ getNumberOfLayers()
int ImageSprite::getNumberOfLayers |
( |
| ) |
const |
|
inline |
◆ getWidth()
int ImageSprite::getWidth |
( |
| ) |
const |
|
inlinevirtual |
Gets the width in pixels of the image of the current frame
Implements Sprite.
Definition at line 54 of file imagesprite.h.
References mImage.
◆ play()
bool ImageSprite::play |
( |
const std::string & |
action | ) |
|
|
inlinevirtual |
Plays an action using the current direction.
- Returns
- true if the sprite changed, false otherwise
Implements Sprite.
Definition at line 44 of file imagesprite.h.
◆ reset()
bool ImageSprite::reset |
( |
| ) |
|
|
inlinevirtual |
Resets the sprite.
- Returns
- true if the sprite changed, false otherwise
Implements Sprite.
Definition at line 41 of file imagesprite.h.
◆ setSpriteDirection()
Sets the direction.
- Returns
- true if the sprite changed, false otherwise
Implements Sprite.
Definition at line 63 of file imagesprite.h.
◆ update()
bool ImageSprite::update |
( |
const int |
time | ) |
|
|
inlinevirtual |
Inform the animation of the passed time so that it can output the correct animation frame.
- Returns
- true if the sprite changed, false otherwise
Implements Sprite.
Definition at line 47 of file imagesprite.h.
◆ updateNumber()
bool ImageSprite::updateNumber |
( |
const unsigned |
num | ) |
|
|
inlinevirtual |
◆ mImage
Image* ImageSprite::mImage |
|
private |
The documentation for this class was generated from the following files: