#include "game/component.hpp" #include "game/entity.hpp" Entity* SpaceshipWeaponCmpt::ShootBullet(const Point& dir) { Entity* bullet = CreateBullet(damage, owner, maxSpeed); bullet->Use()->speed = Normalize(dir) * shootSpeed; bullet->Use()->position = owner->Get()->position; return bullet; }