Meteor2D
dev internal
Meteor is a lightweight 2D game engine.
Loading...
Searching...
No Matches
spritesheet.h
1
#pragma once
2
#include <meteorutils/rect.h>
3
#include <2d/texture.h>
4
5
namespace
meteor {
9
class
MSpriteSheet
:
public
MEntity
{
10
public
:
16
MSpriteSheet
(std::string texturePath, std::vector<SRect> rects);
21
MTexture
*
getTexture
();
28
SRect
sample
(
int
& index,
bool
loop);
29
private
:
30
MTexture
* spriteTex;
31
std::vector<SRect> spriteRects;
32
};
33
}
meteor::MEntity
An Entity is the base class for all data and behaviour oriented objects in meteor....
Definition
entity.h:9
meteor::MSpriteSheet
This class holds the Rects within a texture that form an Animation.
Definition
spritesheet.h:9
meteor::MSpriteSheet::sample
SRect sample(int &index, bool loop)
Sample the sprite-sheet for a animation frame rect.
meteor::MSpriteSheet::getTexture
MTexture * getTexture()
Gets the Texture for this sprite-sheet.
meteor::MSpriteSheet::MSpriteSheet
MSpriteSheet(std::string texturePath, std::vector< SRect > rects)
Constructor.
meteor::MTexture
This class holds an image that can be rendererd to the screen.
Definition
texture.h:12
meteor::SRect
A struct representing rectangle.
Definition
rect.h:8
D:
Github
Meteor2D
Meteor2D
Engine
include
2d
spritesheet.h
Generated by
1.10.0