Even though I knew that I’m gonna be the red cube after being hit I somehow had to “recalculate” my brain for being the predator now instead of the prey. The switch between red and blue is a real challenge for the brain. I guess, that’s the actual idea of the game. If yes, then well done!
I like the change in music when changing from blue to red and vie versa. But some visual indicator could support the switch even more.
For instance you could change the background color. Give it a blue tint when being hunted down. When being hit by the red cube and therefore being reborn as red cube yourself you could just fade the background color to something slightly tinted red instead of blue.
That way the player would get some visual feedback of what’s happening (more obvious feedback than the health hearts only).
Or add some “loud screaming” labels when being reborn like: “Get him now!” or “Flee! He’s after you!” … something like that. Maybe also color the labels accordingly.
Other than that, challenging game. Playing the blue cube is easier. Once I thought “hey, that’s almost too easy”, the red one got me instantly (happened twice). Playing the red cube is harder, I think. The blue cube’s AI is pretty good. Or maybe playing the red cube is too slow?
I like however that you managed to implement the kids game “tag” with just two cubes in a small app.