예제 #1
0
    public void UpPhoto(bool isUP, JsonData jd)
    {
        if (isUP == false)
        {
            PhotoScene.Instance.specialEffectsUI.clickHide(UPHide2);
            return;
        }
        PhotoScene.Instance.IsUpPhoto = true;
        if (GetItmeDataObjectCount() < 20)
        {
            UpPoints = GetItmeDataObjectCount();
        }
        tmpUpItemData      = new ItemData(jd, PhotoRoot);
        tmpUpItemData.isUp = true;
        Vector3  tmpV3           = m_PhotoConfigArray.GetPos(UpPoints);
        ItemData tmpFindItemData = FindItemData(tmpV3);

        if (tmpFindItemData != null)
        {
            bool isRemove = RemoveItemDictinary(tmpFindItemData.nid);
            if (isRemove)
            {
                tmpUpItemData.SetPos(tmpV3);
                m_itemGameObjectDictinary.Add(jd["cardId"].ToString(), tmpUpItemData);
                tmpUpItemData.itemRootObj.transform.SetParent(PhotoRoot.transform);
                tmpUpItemData.item.gameObject.SetActive(true);
                PhotoScene.Instance.specialEffectsUI.clickHide(UPHide);
            }
            else
            {
                PhotoScene.SendDebug("上传出错  已有相片 未能删除");
            }
        }
        else
        {
            tmpUpItemData.SetPos(tmpV3);
            m_itemGameObjectDictinary.Add(jd["cardId"].ToString(), tmpUpItemData);
            tmpUpItemData.itemRootObj.transform.SetParent(PhotoRoot.transform);
            tmpUpItemData.item.gameObject.SetActive(true);
            MsgBase.SendMsg <bool, float>("ShowBlur", true, 10);
            PhotoScene.Instance.specialEffectsUI.clickHide(UPHide);
        }
    }
예제 #2
0
    private void ItemClickShowEnd()
    {
        JsonData jsonData = null;

        if (ClickItemData != null)
        {
            jsonData = ClickItemData.itemJson;
            if (jsonData == null)
            {
                PhotoScene.SendDebug(" 单张点击  jsonData    空");
                return;
            }
        }
        // MsgBase.SendMsg<JsonData, Callback<bool, string>>("U2N_U_OpenStory", jsonData, null);
        JsonData jd = new JsonData();

        jd["Event"] = "EventClickItme";
        jd["data"]  = jsonData;
        Debug.Log(jd.ToJson());
        Native.Instance.SendNative(jd);
        ClickItemData = null;
    }