#include "entity_timer_display.h"

/* Initializes timer display. */
void
entity_timer_display_init(ECS* ecs, u32 id)
{
	ComponentHUDDisplay* hudDisplay;
	ComponentTimer* timer;

	hudDisplay = ecs_component_add(ecs, ECS_COMPONENT_HUD_DISPLAY, id);
	timer = ecs_component_add(ecs, ECS_COMPONENT_TIMER, id);

	component_timer_init(timer, TIMER_DISPLAY_TIME);

	component_hud_display_init
	(
		hudDisplay,
		ecs,
		(f32*)ENTITY_TIMER_DISPLAY_POSITION,
		id,
		HUD_DISPLAY_FORMAT_TIME_MM_SS,
		ICON_TIMER,
		ECS_COMPONENT_TIMER
	);
}
