コード例 #1
0
ファイル: TipsManagerScript.cs プロジェクト: YLancer/DN
    public void loadDialog(string titlestr, string msgstr, DialogPanelScript.ButtonOnClick yesCallBack, DialogPanelScript.ButtonOnClick noCallBack)
    {
        GameObject temp = GameObject.Instantiate(Resources.Load("Prefab/Image_Base_Dialog") as GameObject);

        temp.transform.parent        = parent;
        temp.transform.localScale    = Vector3.one;
        temp.transform.localPosition = Vector3.zero;
        temp.GetComponent <DialogPanelScript> ().setContent(titlestr, msgstr, true, yesCallBack, noCallBack);
    }
コード例 #2
0
    public void loadDialog(string titlestr, string msgstr, DialogPanelScript.ButtonOnClick yesCallBack, DialogPanelScript.ButtonOnClick noCallBack)
    {
        MainView = GameObject.FindWithTag("MainView");

        parent = MainView.transform;


        GameObject temp = GameObject.Instantiate(Resources.Load("Prefab/Image_Base_Dialog") as GameObject);

        temp.transform.parent        = parent.parent;
        temp.transform.localScale    = Vector3.one;
        temp.transform.localPosition = new Vector3(0, 60);
        temp.GetComponent <DialogPanelScript> ().setContent(titlestr, msgstr, true, yesCallBack, noCallBack);
        temp.transform.SetSiblingIndex(parent.childCount - 1);
    }