我在团结中使用Ngui
我在NGui写过事件按钮OnClick
void OnClick()
{
if (gameObject.name == "More Game")
{
if (ShowMoreGame!= null)
{
ShowMoreGame(gameObject, EventArgs.Empty);
}
}
}
在Winphone中,我编写了代码:
private void Unity_Loaded()
{
Menuclick more = (Menuclick)UnityEngine.Object.FindObjectOfType(typeof(Menuclick));
more.ShowMoreGame+= lisGame;
}
void lisGame(object sender, EventArgs e)
{
this.Dispatcher.BeginInvoke(delegate
{
MarketplaceSearchTask mkSearch = new MarketplaceSearchTask();
mkSearch.SearchTerms = "dev";
mkSearch.Show();
});
}
它不能正常工作