예제 #1
0
파일: Chest.cs 프로젝트: ayamidesu/shared
 public override object Clone()
 {
     ChestData data = new ChestData();
     data.Name = chestData.Name;
     data.IsLocked = chestData.IsLocked;
     data.IsTrapped = chestData.IsTrapped;
     data.TextureName = chestData.TextureName;
     data.TrapName = chestData.TrapName;
     data.KeyName = chestData.KeyName;
     data.MinGold = chestData.MinGold;
     data.MaxGold = chestData.MaxGold;
     foreach (KeyValuePair<string, string> pair in chestData.ItemCollection)
         data.ItemCollection.Add(pair.Key, pair.Value);
     Chest chest = new Chest(data);
     return chest;
 }
예제 #2
0
        public override object Clone()
        {
            ChestData data = new ChestData();
            data.Name = chestData.Name;
            data.DifficultyLevel = chestData.DifficultyLevel;
            data.IsLocked = chestData.IsLocked;
            data.IsTrapped = chestData.IsTrapped;
            data.TrapName = chestData.TrapName;
            data.KeyName = chestData.KeyName;
            data.KeyType = chestData.KeyType;
            data.KeysRequired = chestData.KeysRequired;
            data.MinGold = chestData.MinGold;
            data.MaxGold = chestData.MaxGold;

            foreach (KeyValuePair<string, string> item in chestData.ItemCollection)
                data.ItemCollection.Add(item.Key, item.Value);

            Chest chest = new Chest(data);
            return chest;
        }