Пример #1
0
    // Update is called once per frame
    void Update()
    {
        if (pushs.Count == 0)
        {
            return;
        }
        if (!ConfirmUtil.isConfirmShow() && !LoadUtil.isActivity() && !DialogUtil.isPopTips())
        {
            if (!isOpen)
            {
                tryToOpenPush();
            }
        }
        ByteBuffer buffer = MyUtilTools.tryToLogic("DealGrab");

        if (buffer != null)
        {
            DialogUtil.tip("抢单成功", true);
        }
        buffer = MyUtilTools.tryToLogic("DealFavorite");
        if (buffer != null)
        {
            int type = buffer.ReadInt();
            int len  = buffer.ReadInt();
            MainData.instance.user.favorites.Clear();
            for (int i = 0; i < len; i++)
            {
                long value = buffer.ReadLong();
                MainData.instance.user.favorites.Add(value);
            }
            DialogUtil.tip(type == 0 ? "收藏成功" : "取消收藏成功", true);
        }
    }