コード例 #1
0
        public void LoadFromJSON(string jsonString)
        {
            if (string.IsNullOrEmpty(jsonString))
            {
                return;
            }
            WorkoutPlaylist workoutPlaylist = JsonConvert.DeserializeObject <WorkoutPlaylist>(jsonString);

            if (workoutPlaylist == null)
            {
                return;
            }
            this.definition = workoutPlaylist.definition;
            this.songs      = workoutPlaylist.songs;
            for (int index = 0; index < this.songs.Count; ++index)
            {
                this.songs[index].musicActionList = MusicActionListSerializer.instance.ReadSerializedActionList(this.songs[index].serialisedActionList);
            }
        }
コード例 #2
0
        public WorkoutPlaylist(WorkoutPlaylist playlist)
        {
            definition = new WorkoutInfo(playlist.definition);

            songs = new List <SongDefinition>(playlist.songs);
        }