#pragma once

#include "../../GAME_COMMON.h"
#include "../ecs_entity.h"

#include "component_physics.h"

#include "../../../engine/circle.h"

typedef struct ComponentCircleCollision
{
	ECSComponent component;
	Circle circle;
	Vector collisions;
} ComponentCircleCollision;

void component_circle_collision_init
(
	ComponentCircleCollision* self,
	ECS* ecs,
	f32 radius
);

void component_circle_collision_add(ComponentCircleCollision* self, ECS* ecs);
void component_circle_collision_delete(ComponentCircleCollision* self, ECS* ecs);
void component_circle_collision_tick(ComponentCircleCollision* self, ECS* ecs);

static const ECSComponentInfo COMPONENT_CIRCLE_COLLISION_INFO = 
{
	.system = 
	{
		.functions = 
		{ 
			(ECSFunction)component_circle_collision_add,
			(ECSFunction)component_circle_collision_delete,
			(ECSFunction)component_circle_collision_tick,
			NULL
		}
	},
	.type = ECS_COMPONENT_CIRCLE_COLLISION,
	.size = sizeof(ComponentCircleCollision)
};


