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

@ -4,6 +4,7 @@ using System.Linq;
using System.Threading.Tasks;
using Cirno.Scripts;
using Cirno.Scripts.Components.FSM;
using Cirno.Scripts.Controllers;
using Cirno.Scripts.Enums;
using Cirno.Scripts.Misc;
using Cirno.Scripts.Resources;
@ -389,11 +390,12 @@ public partial class GameManager : Node2D
public void ClearBullets()
{
if (_bulletsContainer is null) return;
foreach (var node in _bulletsContainer.GetChildren())
{
node.QueueFree();
}
PoolingManager.Instance.DisableAllBullets();
// if (_bulletsContainer is null) return;
// foreach (var node in _bulletsContainer.GetChildren())
// {
// node.QueueFree();
// }
}
public void RecalculateTilemap(Vector2 position)