18 lines
353 B
C
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;
|
|
}
|