feat(enemy): els enemics poden disparar bales via tick d'IA
This commit is contained in:
@@ -19,7 +19,11 @@ class Bullet : public Entities::Entity {
|
||||
explicit Bullet(Rendering::Renderer* renderer);
|
||||
|
||||
void init() override;
|
||||
void fire(const Vec2& position, float angle, uint8_t owner_id, float bullet_speed);
|
||||
// cfg = nullptr → manté el config actual (per defecte: BulletRegistry::get()).
|
||||
// cfg != nullptr → substitueix el config per a aquesta bala (recarrega
|
||||
// shape, recalcula collision_radius_, mass, etc.). Útil per a bales
|
||||
// d'enemic amb shape pròpia.
|
||||
void fire(const Vec2& position, float angle, uint8_t owner_id, float bullet_speed, const BulletConfig* cfg = nullptr);
|
||||
void update(float delta_time) override;
|
||||
void postUpdate(float delta_time) override;
|
||||
void draw() const override;
|
||||
|
||||
Reference in New Issue
Block a user