Example #1
0
    // Update is called once per frame
    void Update()
    {
        if (isClick)
        {
            switch (MsgCenter.insertType)
            {
            case "1":
                if (D_FengGe.value == 0 || D_SceneStyle.value == 0)
                {
                    break;
                }
                xmlStr = InsertData.AddScene(I_Name.text, I_Code.text, I_Sequ.text, MsgCenter.corpID, MsgCenter.FengGe[D_FengGe.captionText.text], MsgCenter.SceneStyle[D_SceneStyle.captionText.text], T_Picture.text, T_Spicture.text, T_Audio.text);
                break;

            case "2":
                if (MsgCenter.nowHouse == null || MsgCenter.nowScenePoint == null)
                {
                    break;
                }
                xmlStr = InsertData.AddRoom(I_Name.text, I_Code.text, MsgCenter.nowHouse.ID.ToString(), MsgCenter.corpID, MsgCenter.nowScenePoint.x.ToString(), MsgCenter.nowScenePoint.y.ToString(), T_Picture.text, T_Spicture.text);
                break;

            case "3":
                if (D_FengGe.value == 0 || D_SceneStyle.value == 0 || MsgCenter.nowScene == null || MsgCenter.nowHouse == null || MsgCenter.StyleTarget == TargetStyle.chuanghu || MsgCenter.StyleTarget == TargetStyle.Null)
                {
                    break;
                }
                xmlStr = InsertData.AddPanorama(I_Name.text, I_Code.text, I_Sequ.text, I_Group.text, MsgCenter.FengGe[D_FengGe.captionText.text], EnumToolV2.GetDescription(MsgCenter.StyleTarget), MsgCenter.nowHouse.ID.ToString(), MsgCenter.nowScene.ID.ToString(), MsgCenter.corpID, T_Picture.text, T_Spicture.text, T_Bpicture.text);
                break;

            case "4":

                break;

            case "5":

                break;

            case "6":

                break;

            case "7":

                break;

            default:
                break;
            }
            if (xmlStr == "" || xmlStr == null)
            {
                this.gameObject.SetActive(false);
            }
            else
            {
                StartCoroutine(WaitXML());
            }
            isClick = false;
        }
    }