#pragma once

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

#include "component_control_aim.h"
#include "component_control_move.h"
#include "component_control_shoot.h"
#include "component_control_redirect.h"
#include "component_control_recall.h"
#include "component_control_lock.h"
#include "component_control_heart.h"

typedef struct ComponentControlPlayer
{
	ECSComponent component;
} ComponentControlPlayer;

void
component_control_player_init
(
	ComponentControlPlayer* self, 
	ECS* ecs,
	f32 speed,
	f32 angleThreshold,
	f32 shootCooldown,
	u32 spawnID
);

void component_control_player_add(ComponentControlPlayer* self, ECS* ecs);
void component_control_player_delete(ComponentControlPlayer* self, ECS* ecs);

static const ECSComponentInfo COMPONENT_CONTROL_PLAYER_INFO = 
{
	.system = 
	{
		.functions = 
		{ 
			(ECSFunction)component_control_player_add,
			(ECSFunction)component_control_player_delete,
			NULL,
			NULL
		}
	},
	.type = ECS_COMPONENT_CONTROL_PLAYER,
	.size = sizeof(ComponentControlPlayer)
};
