Hi and in a first time sorry if my english is bad.
I’m working on a school project and I need help about masks. My game is a runner and I have various pattern (image with a pixelMask) which constantly spawn. But my problem is that I want different type of obstacle on each pattern, so can I differantiate the differents types if I use color or alpha ?
For example :
I have a pattern which is a single PNG file with a blue block and a red block.
In this pattern I want that when my player collide the blue block, he’s just blocked and when he collide the red block, he die. Can I use any function to do that or I have to write the position of my red block in the code ?
Thanks for your responses.