Ejemplo n.º 1
0
    public static HuaFeiAlertView CreateAlertView()
    {
        Object obj = Resources.Load("pbHuaFeiAlertView");

        if (obj != null)
        {
            GameObject go = Instantiate(obj) as GameObject;
            SDK.AddChild(go, WGRootManager.Self.goRootTopUI);
            HuaFeiAlertView v = go.GetComponent <HuaFeiAlertView>();
            return(v);
        }
        return(null);
    }
Ejemplo n.º 2
0
    void OnBtnDuiHuan()
    {
        HuaFeiAlertView alert = HuaFeiAlertView.CreateAlertView();

        alert.alertViewBehavriour = (ab, view) => {
            switch (ab)
            {
            case MDAlertBehaviour.CLICK_OK:
                view.hiddenView();
                break;

            case MDAlertBehaviour.DID_HIDDEN:
                Destroy(view.gameObject);
                break;
            }
        };
        alert.showView();
    }