It's a parody or based on a Hentai game called Parasite in City. I wonder if has any of members of Inkbunny Heard of that game. Sonic cosplayed as the blonde unnamed girl in that game who's the player and the main character. The game is about some sort of a Zombie apocolypse and the zombies are trying to rape the player. So she uses a gun to shoot the monsters.
First of all, I don't seem to recall a game like that. But, I think I know a movie somewhere in either Japan or Korea that had a situation like that.
Second, you know what other game would look cool as a parody or based on with Sonic characters? Hotline Miami 2: Wrong Number. In case you don't know what I'm talking about, here's some info.