I’d like to share my code for managing bullet like entities, hope it will help someone.
First of all - project structure:
bullet- is just an object which contain only one sprite (representing an enemy or bullet). It is created using a Factory.
controller - this is a script included in your main game collection. It contains update cycle.
controller.script (5.2 KB)
I’ve included as much comments as i can. If something is not clear, feel free to ask