Exemplo n.º 1
0
        internal static Track ToTrack(JSONObject jsonObj)
        {
            Track track = new Track();

            List <HapticEffect> effectList = new List <HapticEffect>();
            var effects = jsonObj.GetValueOrDefault("effects", new JSONArray());

            foreach (var effect in effects)
            {
                effectList.Add(HapticEffect.ToEffect(effect.Value.AsObject));
            }
            track.Effects = effectList.ToArray();

            return(track);
        }
Exemplo n.º 2
0
        internal static Track ToTrack(JsonObject jsonObj)
        {
            Track track = new Track();

            List <HapticEffect> effectList = new List <HapticEffect>();
            var effects = jsonObj.GetNamedArray("effects", new JsonArray());

            foreach (var effect in effects)
            {
                effectList.Add(HapticEffect.ToEffect(effect.GetObject()));
            }
            track.Effects = effectList.ToArray();

            return(track);
        }