Tag Info

New answers tagged

0

You mentioned an object pool for each enemy subclass... "It seems a bit weird." But it would work, right? Seems fine to me. Subclassing helps you organize your code, while object pools are inherently a space-for-time tradeoff. Another approach (which you allude to) would be to reduce your number of classes with parameterization. One extreme ...


0

I don't know if this helps you but this is a nested for loop that places a prefab object at an x and y location. The cardAmountX can be changed to whatever amount you want and it basically sets the number of columns you will have. The cardAmountY can also be change to whatever amount you want and it sets the number of rows you want. Just be aware that these ...


0

It sound to me as though you already have an entire map of the town drawn up and you are trying to break it down into 16px X 16px tiles for the sole purpose of adding triggers and colliders etc. Why not just keep the map as its own object and put your collider and trigger objects over it where you need them to be? Really, a tile based map might be better ...



Top 50 recent answers are included