pettankojin Posted December 2, 2015 Share Posted December 2, 2015 Hello I was reading the documentation and cheatsheet about object pool but I'm not sure what's the proper way to manage it.Let's say that I have a game where 2 enemy ships appear every5 seconds. Do I first add 2 objects to the pool? What should I do when there need to be more enemies, like 5?How do you access the objects individually later?Also, how do you "deactivate" the objects and return them to the pool.Sorry if it's an obvious qiestion but I'm not sure how to approach this. Quote Link to comment Share on other sites More sharing options...
manic.blood1993 Posted August 30, 2016 Share Posted August 30, 2016 Hey there, http://www.pandajs.net/demos/interactivity.html This tutorial I found helped me out greatly with creating objects. Using a class to describe them., and then you call the class with a loop. Simply tell the loop how many cycles to perform (or enemies to create). If you need more than just a heads up, I can help you modify the code. Message me back gaelbeltran 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.