0

我统一使用 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();

        });
    }

它不工作

4

0 回答 0