Use std::function in MapScene