コード例 #1
0
 private void SaveChest(bool save)
 {
     if (save)
     {
         if (SelectedChest != null)
         {
             var worldChest = CurrentWorld.GetChestAtTile(SelectedChest.X, SelectedChest.Y);
             if (worldChest != null)
             {
                 int index = CurrentWorld.Chests.IndexOf(worldChest);
                 CurrentWorld.Chests[index] = SelectedChest.Copy();
             }
             //SelectedChest = null;
         }
     }
     else
     {
         SelectedChest = null;
     }
 }