Esempio n. 1
0
    public static GeneralWindowDialog Create(Camera camera = null)
    {
        GameObject _tmpObj = Resources.Load("Prefab/GeneralWindowDialog/GeneralWindowDialog") as GameObject;

        if (_tmpObj == null)
        {
            return(null);
        }

        GameObject _newObj = Instantiate(_tmpObj) as GameObject;

        if (_newObj == null)
        {
            return(null);
        }
        UnityUtil.SetObjectEnabledOnce(_newObj, true);

        GeneralWindowDialog dialog = _newObj.GetComponent <GeneralWindowDialog>();

        if (camera != null && dialog != null)
        {
            dialog.SetCamera(camera);
        }
        return(dialog);
    }
Esempio n. 2
0
    void OnClickGeneralWindow(OthersInfoListContext item)
    {
        SoundUtil.PlaySE(SEID.SE_MENU_OK2);
        GeneralWindowDialog dialog = GeneralWindowDialog.Create();

        dialog.SetGroupID(item.ID);
        dialog.SetDialogEvent(GeneralWindowDialog.ButtonEventType.CLOSE, () =>
        {
        });

        dialog.Show();
    }
Esempio n. 3
0
    public void OnClickOpen()
    {
        GeneralWindowDialog dialog = GeneralWindowDialog.Create();

        dialog.SetGroupID(m_CurrentID);
        dialog.SetDialogEvent(GeneralWindowDialog.ButtonEventType.YES, () =>
        {
            Debug.Log("Send Yes");
        });
        dialog.SetDialogEvent(GeneralWindowDialog.ButtonEventType.NO, () =>
        {
            Debug.Log("Send No");
        });
        dialog.SetDialogEvent(GeneralWindowDialog.ButtonEventType.CLOSE, () =>
        {
            Debug.Log("Send Close");
        });

        dialog.Show();
    }