#pragma once

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

#include "../component_game_object.h"
#include "../stat/component_allegiance.h"
#include "../stat/component_health.h"
#include "../stat/component_level.h"

typedef struct ComponentCharacter
{
	ECSComponent component;
} ComponentCharacter;

void
component_character_init
(
	ComponentCharacter* self,
	ECS* ecs,
	Texture texture,
	ivec2 frameSize,
	ivec2 atlasSize,
	vec2 size,
	vec2 physicsSize,
	vec3 position,
	f32 friction,
	f32 velocityMax,
	AllegianceType allegianceType,
	u32 healthValue,
	bool isBounce,
	bool isAffectedByGravity,
	bool isSolid
);

void component_character_add(ComponentCharacter* self, ECS* ecs);
void component_character_delete(ComponentCharacter* self, ECS* ecs);

static const ECSComponentInfo COMPONENT_CHARACTER_INFO = 
{
	.system = 
	{
		.functions = 
		{ 
			(ECSFunction)component_character_add,
			(ECSFunction)component_character_delete,
			NULL,
			NULL
		}
	},
	.type = ECS_COMPONENT_CHARACTER,
	.size = sizeof(ComponentCharacter)
};


