first commit
This commit is contained in:
17
src/game/ecs/component/visual/component_rotate.c
Normal file
17
src/game/ecs/component/visual/component_rotate.c
Normal file
@ -0,0 +1,17 @@
|
||||
#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;
|
||||
}
|
Reference in New Issue
Block a user