mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 11:01:49 +00:00
world-wide commit to ruin everything
This commit is contained in:
parent
fbce36a05c
commit
8a073e4e8a
57 changed files with 1433 additions and 958 deletions
29
src/graphics/Sprite.h
Normal file
29
src/graphics/Sprite.h
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
#ifndef SRC_GRAPHICS_SPRITE_H_
|
||||
#define SRC_GRAPHICS_SPRITE_H_
|
||||
|
||||
#include <glm/glm.hpp>
|
||||
#include "UVRegion.h"
|
||||
|
||||
class Texture;
|
||||
|
||||
class Sprite {
|
||||
public:
|
||||
glm::vec2 position;
|
||||
glm::vec2 size;
|
||||
glm::vec2 origin;
|
||||
glm::vec4 color;
|
||||
float angle;
|
||||
bool flippedX = false;
|
||||
bool flippedY = false;
|
||||
Texture* texture;
|
||||
UVRegion region;
|
||||
|
||||
Sprite(glm::vec2 position, glm::vec2 size, Texture* texture);
|
||||
virtual ~Sprite();
|
||||
|
||||
void setTexture(Texture* texture) {
|
||||
this->texture = texture;
|
||||
}
|
||||
};
|
||||
|
||||
#endif /* SRC_GRAPHICS_SPRITE_H_ */
|
||||
Loading…
Add table
Add a link
Reference in a new issue