blob: ead5981fc1b1efe468e4445598a18792182dbc98 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#pragma once
#include <string>
#include "raylib.h"
namespace Renderer {
class Sprite {
public:
std::string texture_name;
Rectangle source_rectangle;
Vector2 origin;
Sprite(std::string texture_name,
Rectangle source_rectangle,
Vector2 origin = (Vector2){0,0}
);
void drawPro(Rectangle dest_rectangle, float rotation = 0, Color color = WHITE);
void draw(float x, float y, float scale = 1.0, float rotation = 0, Color color = WHITE);
};
}
|