예제 #1
0
        static void Main(string[] args)
        {
            var writer = new TrkWriter();
            var reader = new TrkReader();

            var track = reader.ReadTrack(filename);

            track.theme = theme;

            var elements = track.GetElements();

            elements.ForEach(ChangeTheme);

            writer.WriteTrack(track, "test2.trk");
        }
예제 #2
0
        static void Main(string[] args)
        {
            var writer = new TrkWriter();
            var track  = new Track()
            {
                size  = Track.TrackSize.Multiplayer,
                theme = Track.TrackTheme.Ice,
                time  = Track.TrackTime.Night
            };

            track.Add(new TrackElement()
            {
                theme    = track.theme, // theme is set first, because that's important for the ID.
                index    = 0,
                rotation = 0,
                pos      = new GridPosition(0, 0, 0)
            });

            writer.WriteTrack(track, "test.trk");
        }