0
0
mirror of https://github.com/Nimac0/SDL_Minigame synced 2026-01-12 10:13:42 +00:00
SDL_Minigame/include/ProjectileComponent.h

28 lines
560 B
C++

#pragma once
#include "Component.h"
#include "Vector2D.h"
#include "Constants.h"
class TransformComponent;
class ProjectileComponent : public Component
{
//can maybe be split in separate .cpp file
public:
ProjectileComponent(int range, int speed, Vector2D direction) : range(range), speed(speed), direction(direction) {}
~ProjectileComponent() {}
void init() override;
void update() override;
private:
TransformComponent* transformComponent;
int range = 0;
int speed = 0;
int distance = 0;
Vector2D direction;
};