Refactored mouse input in GameLayer