|
ShitEngine
基于 C++20 与 SDL3 的轻量级 2D 游戏引擎
|
精灵数据,描述"画什么" 更多...
#include <Sprite.h>
Public 成员函数 | |
| Sprite () | |
| Sprite (const std::string &texturePath, const std::optional< SDL_FRect > &sourceRect=std::nullopt, bool flipped=false) | |
| const std::string & | getTexturePath () const |
| const std::optional< SDL_FRect > & | getSourceRect () const |
| bool | isFlipped () const |
| void | setTexturePath (const std::string &texturePath) |
| void | setSourceRect (const std::optional< SDL_FRect > &rect) |
| void | setFlipped (bool flipped) |
| void | setFrame (const SpriteSheet &sheet, int frameIndex) |
| 从 SpriteSheet 中取第 frameIndex 帧作为源矩形 | |
精灵数据,描述"画什么"
| Sprite | ( | ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| void setFrame | ( | const SpriteSheet & | sheet, |
| int | frameIndex ) |
从 SpriteSheet 中取第 frameIndex 帧作为源矩形
|
inline |
|
inline |