Scriptum/Assets/Scripts/REFACTORING/Application/Panel/SceneChestManager.cs
2022-11-07 23:06:06 +01:00

80 lines
2.9 KiB
C#

// using Shared.Manager.Scene;
// using System.Collections.Generic;
// using UnityEngine;
// using UnityEditor;
// using UnityEngine.SceneManagement;
// using System.IO;
// using System.Linq;
// using REFACTORING.Shared.Manager.Scene;
//
// namespace REFACTORING.Scene
// {
// public class SceneChestManager : SceneBaseDataManager<ChestPrefarbAsset>
// {
// private new const string STATIC_ELEMENT_LOCATION = "/StaticElements/";
// private new const string ELEMENT_FOLDER_NAME = "Chest";
// private new const string ITEM_LIST_NAME = "ChestList";
//
// // [SerializeField]
// // public List<ChestPrefarbAsset> StaticElements;
// //
// // [SerializeField]
// // public List<ChestPrefarbAsset> DynamicElements;
//
// public override void AddElementToList()
// {
// throw new System.NotImplementedException();
// }
//
// public override void RemoveElementFromList()
// {
// throw new System.NotImplementedException();
// }
//
// public override void Build()
// {
// throw new System.NotImplementedException();
// }
//
// public override void LoadData()
// {
// this.StaticElements = LoadStaticChestsList();
// }
//
// #region Static list of Chest Loader
// private List<ChestPrefarbAsset> LoadStaticChestsList()
// {
// var path = SaveSystem.GetSavePath(this.MapName + STATIC_ELEMENT_LOCATION);
//
// if (!Directory.Exists(path))
// return new List<ChestPrefarbAsset>();
//
// List<ChestPrefarbAsset> chestPrefabAssetList = new List<ChestPrefarbAsset>();
//
// foreach(var file in new DirectoryInfo(path).GetFiles())
// {
// Debug.Log(file.FullName);
//
// List<ChestPrefarbAssetData> chestPrefabAssetDataList = SaveChestSystem.LoadChestsList(this.MapName + STATIC_ELEMENT_LOCATION, ITEM_LIST_NAME);
//
// chestPrefabAssetList = chestPrefabAssetDataList.Select(chestPrefabAssetData => chestPrefabAssetData.MapDataToChestPrefarbAsset()).ToList();
//
// // Debug.Log("---- Load Chest");
// //
// // foreach(ChestPrefarbAsset chest in chestPrefarbAssetList)
// // {
// // Debug.Log(chest.name);
// // foreach(KeyValuePair<int, EquippableItemPrefabAsset> equippableItemPrefarbAsset in chest.content)
// // {
// // // Debug.Log("item on position " + equippableItemPrefarbAsset.Key +
// // // " " + equippableItemPrefarbAsset.Value.equippableItem.name);
// // }
// // }
//
// }
//
// return chestPrefabAssetList;
// }
// #endregion
// }
// }