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

27 lines
537 B
C++

#pragma once
#include "Component.h"
#include "Vector2D.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;
};