hydrangea/include/sprite.h

38 lines
631 B
C++

#include <SDL2/SDL.h>
#include <SDL2/SDL_gpu.h>
#include <iostream>
#include <strings.h>
#include <math.h>
#include "math/vec2.h"
#include "node.h"
#ifndef SPRITE_H
#define SPRITE_H
class Sprite : public Node
{
private:
GPU_Image* image;
GPU_Target* target;
void Render();
public:
// Constructor and Deconstructor
explicit Sprite(std::string resource_path);
~Sprite();
// Methods
void Update() override;
void SetImage( GPU_Image img );
void SetImage( char* img_path );
GPU_Image GetImage();
// Member Variables
float angle = 0;
Vec2 scale = Vec2(1, 1);
};
#endif