Bullets pooling

This commit is contained in:
Marco 2025-06-08 16:33:38 +02:00
commit fa3805ecfe
18 changed files with 280 additions and 69 deletions

View file

@ -250,6 +250,7 @@ public partial class Enemy : CharacterBody2D
private void _on_damage_hitbox_area_entered(Area2D area)
{
if (area is not Bullet bullet) return;
if (!bullet.Enabled) return;
if (_invulnerable) return;
if (bullet.BulletInfo.Owner == BulletOwner.Enemy) return;