mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-01 10:35:34 +00:00
Bullets pooling
This commit is contained in:
parent
37bcf8b2d0
commit
fa3805ecfe
18 changed files with 280 additions and 69 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue