mirror of
https://github.com/Nimac0/SDL_Minigame
synced 2026-01-12 09:03:42 +00:00
27 lines
484 B
C++
27 lines
484 B
C++
#pragma once
|
|
#include "Vector2D.h"
|
|
#include "Component.h"
|
|
|
|
class TransformComponent : public Component
|
|
{
|
|
public:
|
|
|
|
Vector2D position;
|
|
Vector2D velocity;
|
|
|
|
int height = 32;
|
|
int width = 32;
|
|
int scale = 1;
|
|
|
|
int speed = 3;
|
|
|
|
TransformComponent();
|
|
TransformComponent(int scale);
|
|
TransformComponent(float x, float y);
|
|
TransformComponent(float x, float y, int scale);
|
|
TransformComponent(float x, float y, int w, int h, int scale);
|
|
|
|
void init() override;
|
|
void update() override;
|
|
};
|