So, I'm working on creating a tower defense game, and the tile works and is able to place towers ... to some extent.
When a player presses a button above the grid, he switches to placing the tower and allows the player to place towers on a cell in the grid. However, each tower also receives a ShapeNode circle around it to handle the detection of creep moving in firing range. This node shape only displays around the tower as soon as I have placed them.
The logic I used to place the tower is that it finds the node you are touching (called the cell) and replaces it with the node tower. But if the node tower has a node circle attached and covering the neighboring cell, I cannot select the node cell below the circle.
How would I touch “through” the circle or set its fill space to be nothing so that I can access the cells below it?
I am still studying a set of sprites, as if there might be a simpler approach, feel free to point me in the right direction.
source
share