#include "component_heart.h"

/* Ticks heart component. */
void
component_heart_tick(ComponentHeart* self, ECS* ecs)
{
	ComponentGoodies* goodies;

	goodies = ecs_component_get(ecs, ECS_COMPONENT_GOODIES, self->component.id);

	if (self->concurrentUses > 1)
		self->multiplier = self->uses + self->concurrentUses;
	else
		self->multiplier = self->uses + 1;

	if (goodies)
		goodies->multiplier = self->multiplier;
}
