Hello everyone. Hope you are doing great.
I’m trying to create my own danmaku pooling system for a project and I’m having these issues where bullets aren’t being generated. My pooling class generates a ton of bullets (lets say 300) so there should be enough bullets, but when a bullet hits an object, or leaves the screen area, I set them to spawn a particle and deactivate and return to the pool. When another bullet is needed, the pool should return a inactive bullet or create 10 more and return one if there aren’t any in the pool. From what I understand this is basic pooling stuff.
Here’s a video showing the issue I’m having: https://youtu.be/sI58Fpcc8NI
Code:
Object Pool - Solar Falcon's Object Pool - Pastebin.com
Bullet - Solar Falcon's Bullet Class - Pastebin.com
Linear Shot Pattern - Solar Falcon's Linear Shot Pattern - Pastebin.com
I want the bullets to fire no matter what is going on, a bullet should appear when the Shot Pattern class needs it. Any help is appreciated.