Esempio n. 1
0
        public CreatorProperties(CreatorProperties clonethis)
        {
            Author = clonethis.Author;
            Version = clonethis.Version;
            Comment = clonethis.Version;
            SavedImages = new Dictionary<string, ImageDataItem>();
            foreach (var iterate in clonethis.SavedImages)
            {
                SavedImages.Add(iterate.Key, (ImageDataItem)iterate.Value.Clone());

            }
            SavedSounds = new Dictionary<string, SoundDataItem>();
            foreach (var iterate in clonethis.SavedSounds)
            {
                SavedSounds.Add(iterate.Key, (SoundDataItem)iterate.Value.Clone());

            }
            SavedScripts = new Dictionary<string, ScriptDataItem>();
            foreach (var iterate in clonethis.SavedScripts)
            {
                SavedScripts.Add(iterate.Key, (ScriptDataItem)iterate.Value.Clone());

            }
        }
Esempio n. 2
0
        public EditorSet()
        {
            CreateData = new CreatorProperties("No Author Specified", "0.0.0", "No Comment");

            LevelData = new LevelSet();
        }
Esempio n. 3
0
        /// <summary>
        /// adds the properties in the given CreatorProperties object with this one.
        /// Images and sounds are added and replaced.
        /// </summary>
        /// <param name="otherprops"></param>
        public void MergeWith(CreatorProperties otherprops)
        {
            foreach (var iterate in otherprops.SavedImages)
                {
                    if (!SavedSounds.ContainsKey(iterate.Key))
                        SavedImages.Add(iterate.Key, iterate.Value);
                    else
                        SavedImages[iterate.Key] = iterate.Value;

                }
                foreach (var iterate in otherprops.SavedSounds)
                {
                    if(!SavedSounds.ContainsKey(iterate.Key))
                        SavedSounds.Add(iterate.Key, iterate.Value);
                    else
                        SavedSounds[iterate.Key] = iterate.Value;

                }
        }
Esempio n. 4
0
 public SingleLevelContainer(SerializationInfo info, StreamingContext context)
 {
     CreateData = (CreatorProperties)info.GetValue("CreateData", typeof(CreatorProperties));
     LevelData = (Level)info.GetValue("LevelData", typeof(Level));
 }