Ah, interesting. What game?
If the spinning gear hasn't chewed up the shaft, and the clearance is fairly tight, superglue should hold it on. This is a trick I see a lot of the milling and lathe guys use on youtube, to stick parts on things when they work them in a lathe. The glue can be broken with heat later if needed.
If the shaft or inner part of the gear is chewed up more, epoxy might be better. However you want to make sure you give it a week to fully cure, as epoxy will set quickly, but it will often stay tacky for a few days, before fully hardening.