/**
     *  静态方法
     *  alert显示
     * */
    public static PanelAlertBehaviours show(string title, string msg)
    {
        Object     obj = Resources.Load("Prefabs/UI/Commons/Prefabs_UI_Alert");
        GameObject Prefabs_UI_Alert = Instantiate(obj) as GameObject;

        Prefabs_UI_Alert.transform.parent        = RootCanvasBehviour.getInstance().Panel_UI_Tips.transform;
        Prefabs_UI_Alert.transform.localScale    = Vector3.one;
        Prefabs_UI_Alert.transform.localPosition = Vector3.zero;
        Prefabs_UI_Alert.name = "Prefabs_UI_Alert";
        PanelAlertBehaviours panelAlertBehaviours = Prefabs_UI_Alert.GetComponent <PanelAlertBehaviours>();

        panelAlertBehaviours.setText(title, msg);

        return(panelAlertBehaviours);
    }
Example #2
0
 /**
  * 显示 创建
  * */
 public static void show(string title, string msg)
 {
     PanelAlertBehaviours.show(title, msg);
 }