#pragma once #include "../../../GAME_COMMON.h" #include "../../ecs_entity.h" #include "../component_game_object.h" typedef void (*ProjectileInit)(ECS*, u32, vec3, u32); typedef struct ComponentShoot { u32 id; ProjectileInit projectileInit; f32 offset; f32 speed; bool isFire; } ComponentShoot; void component_shoot_init(ComponentShoot* self, ProjectileInit projectileInit, f32 speed, f32 offset); void component_shoot_tick(ComponentShoot* self, ECS* ecs); static const ECSComponentInfo COMPONENT_SHOOT_INFO = { .system = { .functions = { NULL, NULL, (ECSFunction)component_shoot_tick, NULL } }, .type = ECS_COMPONENT_SHOOT, .size = sizeof(ComponentShoot) };