The second core aspect is switching of colour. For this, I made an enum to store the colours, and change the player's material and tag each time they switch. Additionally, I pass this information to the wall spawning system.
Finally, there's the collision detection. Essentially, if the player collides with something tagged with a colour, that isn't the same as what they are currently, they get destroyed, otherwise, nothing happens.
Comentários