public static WGAlertView CreateAlertView(int type = 0) { Object mObj = null; if(type == 0) { mObj = mObj0; } else if(type == 1) { mObj = mObj1; } if(mObj == null) { mObj = Resources.Load("pbWGAlertView"+type); } if(type == 0) { mObj0 = mObj; } else if(type == 1) { mObj1 = mObj; } if(mObj != null) { GameObject go = Instantiate(mObj) as GameObject; WGAlertView av = go.GetComponent<WGAlertView>(); av.type = type; return av; } return null; }
public void destroyAlertView(MDBaseAlertView alert) { if (alert == alertView) { alertView = null; } Destroy(alert.gameObject); }
public WGAlertView showAlertView1(string msg, string ok, string cancel, int type) { if (alertView == null) { alertView = WGAlertView.CreateAlertView(type); SDK.AddChild(alertView.gameObject, goTopView); } alertView.ESetActive(true); alertView.freshViewWithTitle(msg, ok, cancel); alertView.showView(); return(alertView); }
public void hiddeAlertView(GameObject goView) { goView.SetActive(false); alertView = null; Destroy(goView); }