Exemplo n.º 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));
     }
 }
Exemplo n.º 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());
        }
Exemplo n.º 3
0
 internal void RemoveOwner(UnrealMap map)
 {
     owners.Remove(map);
 }
Exemplo n.º 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);
 }