示例#1
0
	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;
	}
示例#2
0
    public void destroyAlertView(MDBaseAlertView alert)
    {
        if (alert == alertView)
        {
            alertView = null;
        }

        Destroy(alert.gameObject);
    }
示例#3
0
    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);
    }
示例#4
0
 public void hiddeAlertView(GameObject goView)
 {
     goView.SetActive(false);
     alertView = null;
     Destroy(goView);
 }