#pragma once

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

typedef struct ComponentHealth
{
	ECSComponent component;
	s32 value;
	s32 max;
	bool isDead;
} ComponentHealth;

void component_health_init(ComponentHealth* self, s32 max);
void component_health_tick(ComponentHealth* self, ECS* ecs);

static const ECSComponentInfo COMPONENT_HEALTH_INFO = 
{
	.system = 
	{
		.functions = 
		{ 
			NULL,
			NULL, 
			(ECSFunction)component_health_tick,
			NULL
		}
	},
	.type = ECS_COMPONENT_HEALTH,
	.size = sizeof(ComponentHealth)
};


