Exemplo n.º 1
0
        internal static PathMode ToPathMode(JSONObject jsonObject)
        {
            var pathMode = new PathMode();

            var list = new List <PathModeObjectCollection>();

            foreach (var jsonValue in jsonObject["feedback"].AsArray)
            {
                list.Add(PathModeObjectCollection.ToObject(jsonValue.Value.AsObject));
            }

            pathMode.Feedback = list.ToArray();
            return(pathMode);
        }
Exemplo n.º 2
0
        internal static PathModeObjectCollection ToObject(JSONObject jsonObject)
        {
            var collection = new PathModeObjectCollection();

            collection.PlaybackType  = EnumParser.ToPlaybackType(jsonObject.GetValueOrDefault("playbackType", "NONE"));
            collection.MovingPattern = EnumParser.ToMovingPattern(jsonObject["movingPattern"]);

            List <PathModeObject> list = new List <PathModeObject>();

            foreach (var jsonValue in jsonObject.GetValueOrDefault("pointList", new JSONArray()))
            {
                list.Add(PathModeObject.ToObject(jsonValue.Value.AsObject));
            }

            collection.PointList = list.ToArray();

            return(collection);
        }