Пример #1
0
        public IList <TB_TechniqueLog> FindLogBetweenDate(DateTime start, DateTime end)
        {
            BmobDate st = start;
            BmobDate ed = end;

            BmobQuery query = new BmobQuery();

            query.WhereGreaterThanOrEqualTo("Date", st);
            query.WhereLessThanOrEqualTo("Date", ed);
            return(FindByQuery(query));
        }
Пример #2
0
    public void PullDanmaku(int level, float x, float y, float z)
    {
        if (Mathf.Abs(x - lastX) <= DanmakuSystem.Offset && Mathf.Abs(y - lastY) <= DanmakuSystem.Offset && Mathf.Abs(z - lastZ) <= DanmakuSystem.Offset && level == lastLevel)
        {
            return;
        }
        lastX     = x;
        lastY     = y;
        lastZ     = z;
        lastLevel = level;
        BmobQuery query = new BmobQuery();

        query.WhereEqualTo("Level", level);
        query.WhereGreaterThanOrEqualTo("X", x - DanmakuSystem.Offset);
        query.WhereLessThanOrEqualTo("X", x + DanmakuSystem.Offset);
        query.WhereGreaterThanOrEqualTo("Y", y - DanmakuSystem.Offset);
        query.WhereLessThanOrEqualTo("Y", y + DanmakuSystem.Offset);
        query.WhereGreaterThanOrEqualTo("Z", z - DanmakuSystem.Offset);
        query.WhereLessThanOrEqualTo("Z", z + DanmakuSystem.Offset);
        bmob.Find <Danmaku>("Danmaku", query, (resp, ex) => {
            if (ex != null)
            {
                print("查询失败, 失败原因为: " + ex.Message);
                return;
            }

            //对返回结果进行处理
            List <Danmaku> list = resp.results;
            foreach (Danmaku d in list)
            {
                if (!DanmakuSystem.idSet.Contains(d.objectId))
                {
                    DanmakuSystem.danmakuQueue.Enqueue(d);
                    DanmakuSystem.idSet.Add(d.objectId);
                }
            }
        });
    }