#include "component_ammo.h"

/* Sets ammo component info. */
void
component_ammo_init(ComponentAmmo* self, u32 max)
{
	self->max = max;
	self->value = self->max;
}

/* Ticks ammo component. If ammo is depleted, marks as out. */
void
component_ammo_tick(ComponentAmmo* self, ECS* ecs)
{
	if (self->value <= 0)
		self->isOut = true;
	else
		self->isOut = false;
}
