Beispiel #1
0
        //---------------------------------------------------------------------
        void parseJson(RouteJsonPacket json)
        {
            try
            {
                RouteObject   route_object = BaseJsonSerializer.deserialize <RouteObject>(json.JsonString);
                DynamicSystem system       = new DynamicSystem(new EbVector3(route_object.initPos.x, route_object.initPos.y, 0), getSpeed(route_object.initVelocity));
                foreach (var it in route_object.accs)
                {
                    system.add(it.start_time, getSpeed(it.acc), it.duration);
                }

                mRouteDic.Add(json.FileName, system);
            }
            catch (Exception e)
            {
                EbLog.Note(e.ToString());
            }
        }
Beispiel #2
0
        //---------------------------------------------------------------------
        void parseJson(RouteJsonPacket json)
        {
            try
            {
                RouteObject route_object = BaseJsonSerializer.deserialize<RouteObject>(json.JsonString);
                DynamicSystem system = new DynamicSystem(new EbVector3(route_object.initPos.x, route_object.initPos.y, 0), getSpeed(route_object.initVelocity));
                foreach (var it in route_object.accs)
                {
                    system.add(it.start_time, getSpeed(it.acc), it.duration);
                }

                mRouteDic.Add(json.FileName, system);
            }
            catch (Exception e)
            {
                EbLog.Note(e.ToString());
            }
        }