#pragma once

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

typedef struct ComponentInvincibility
{
	ECSComponent component;
	u32 max;
	u32 value;
	bool isInvincible;
} ComponentInvincibility;

void component_invincibility_init(ComponentInvincibility* self, u32 max);
void component_invincibility_tick(ComponentInvincibility* self, ECS* ecs);

static const ECSComponentInfo COMPONENT_INVINCIBILITY_INFO = 
{
	.system = 
	{
		.functions = 
		{ 
			NULL,
			NULL, 
			(ECSFunction)component_invincibility_tick,
			NULL
		}
	},
	.type = ECS_COMPONENT_INVINCIBILITY,
	.size = sizeof(ComponentInvincibility)
};


