IsoEngine/src/components/sprite_component.h

15 lines
322 B
C
Raw Normal View History

2024-09-09 02:50:07 -06:00
#pragma once
#include "transform_component.h"
2024-09-09 02:50:07 -06:00
struct SpriteComponent {
public:
void* texture; // void* to abstract Texture2D
void Render(float x, float y) const;
void Render(TransformComponent transform) const;
2024-09-09 02:50:07 -06:00
};
// Usage:
// SpriteComponent sprite;
// sprite.texture = static_cast<void*>(&your_texture);