0

I've got a tile system in place, and have a few images loading into that, I have it coded so that if the cell is a 'path' then you can't place down a tower, but i was wandering how i would go about making it so that i couldnt place a tower down on more than one texture, or if it would be easier to say that it can only be placed onto a certain texture, rather than listing textures that it cant be put down on?

1 Answer 1

1

It will be easier in the long run to specify only the textures that a tower can be placed on, as this way, when you add another type of tile, you don't need to add it to the black-list.

A white-list allows greater extensibility, and easier maintenance.

2
  • Thanks, thats what i thought. Do you know how i would go about doing this?
    – Damian
    Jan 29, 2012 at 10:37
  • Without seeing your code, it's almost impossible to give you an accurate implementation of this, as there is no guarantee it would be compatible. Jan 29, 2012 at 11:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.