Exemplo n.º 1
0
        internal static PathModeObject ToObject(JSONObject jsonObject)
        {
            var obj = new PathModeObject();

            obj.Intensity = ParseUtil.GetFloat(jsonObject, "intensity");
            obj.X         = ParseUtil.GetFloat(jsonObject, "x");
            obj.Y         = ParseUtil.GetFloat(jsonObject, "y");
            obj.Time      = ParseUtil.GetInt(jsonObject, "time");

            return(obj);
        }
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);
        }