#pragma once

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

typedef struct ComponentTimer
{
	ECSComponent component;
	u32 value;
	u32 max;
	bool isDone;
} ComponentTimer;

void component_timer_init(ComponentTimer* self, u32 max);
void component_timer_tick(ComponentTimer* self, ECS* ecs);

static const ECSComponentInfo COMPONENT_TIMER_INFO = 
{
	.system = 
	{
		.functions = 
		{ 
			NULL,
			NULL, 
			(ECSFunction)component_timer_tick,
			NULL
		}
	},
	.type = ECS_COMPONENT_TIMER,
	.size = sizeof(ComponentTimer)
};
