有人告诉我,在玩游戏时接到来电时如何在windows phone 8中获得控制权?
有来电时要触发的功能吗?
请有人帮忙解决这个问题?
如果有人遇到同样的问题,如果您使用的是 Unity Engine,以下将是解决方案。
//For interrupt handling
private bool isGameInterrupted;
void OnApplicationPause(bool isInterrupted)
{
if( !isGameInterrupted && isInterrupted )
{
isGameInterrupted = true;
}
if( isGameInterrupted )
{
// Call your pause screen here //
isGameInterrupted = false;
}
}