Files
frillrun/src/game/ecs/component/visual/component_rotate.c
2024-08-24 00:47:58 -04:00

18 lines
353 B
C

#include "component_rotate.h"
void
component_rotate_tick(ComponentRotate* self, ECS* ecs)
{
ComponentTextureQuad* textureQuad;
textureQuad = ecs_component_get(ecs, COMPONENT_TEXTURE_QUAD, self->component.id);
textureQuad->rotation += self->speed;
}
void
component_rotate_init(ComponentRotate* self, ECS* ecs, f32 speed)
{
self->speed = speed;
}