예제 #1
0
 protected UnrealMap(UnrealMap map) : base(map)
 {
     FilePath = map.FilePath;
     title    = map.title;
     author   = map.author;
     song     = map.song;
     Type     = map.Type;
     // Duplicate actors sequentially; brushes and ownership will be handled correctly this way
     foreach (var actor in map.Actors)
     {
         AddActor(UnrealActorFactory.Duplicate(actor));
     }
 }
예제 #2
0
        /// <summary>
        /// Generates a complete T3D file starting from a map instance.
        /// </summary>
        public static string GenerateText(UnrealMap map)
        {
            var builder = new StringBuilder();

            // Add header
            builder.AppendLine("Begin Map");
            // Add all actors
            foreach (var actor in map.Actors)
            {
                builder.AppendLine(actor.Text);
            }
            // Add footer
            builder.AppendLine("End Map");

            return(builder.ToString());
        }
예제 #3
0
 internal void RemoveOwner(UnrealMap map)
 {
     owners.Remove(map);
 }
예제 #4
0
 // Taken care of by UnrealMap
 internal void AddOwner(UnrealMap map)
 {
     // Ensure that the newest owner is the latest item in the list
     owners.Remove(map);
     owners.Add(map);
 }