#pragma once

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

typedef struct ComponentRedirect
{
	ECSComponent component;
	u32 max;
	u32 value;
	bool isOut;
} ComponentRedirect;

void component_redirect_init(ComponentRedirect* self, u32 max);
void component_redirect_tick(ComponentRedirect* self, ECS* ecs);

static const ECSComponentInfo COMPONENT_REDIRECT_INFO = 
{
	.system = 
	{
		.functions = 
		{ 
			NULL,
			NULL, 
			(ECSFunction)component_redirect_tick,
			NULL
		}
	},
	.type = ECS_COMPONENT_REDIRECT,
	.size = sizeof(ComponentRedirect)
};


