#include "component_animation_move.h"

/* Initializes animation move component. */
void
component_animation_move_init(ComponentAnimationMove* self, vec3 velocity)
{
	glm_vec3_copy(velocity, self->velocity);
}

/* Ticks animation move component. */
void
component_animation_move_tick(ComponentAnimationMove* self, ECS* ecs)
{
	DrawObject* drawObject;
	f32 progress;
	vec4 color;
	vec4 colorDifference;
	vec4 colorStep;

	drawObject = ecs_component_get(ecs, ECS_COMPONENT_SPRITE, self->component.id);
	
	if (!drawObject)
		drawObject = ecs_component_get(ecs, ECS_COMPONENT_TEXT, self->component.id);

	glm_vec3_add(drawObject->position, self->velocity, drawObject->position);

}
