using System.Collections; using System.Collections.Generic; using UnityEngine; public enum RoomType { EmptyRoom = 0, PlaceholderRoom = 1, BugStatueRoom = 2, BlankRoom = 3, } [System.Serializable] public class DungeonDataclass { public Vector2Int position; public RoomType roomType; public int id; public int roomSize; } [CreateAssetMenu(fileName = "DungeonHomeSO", menuName = "GameData/DungeonHomeSO")] public class DungeonHomeSO : ScriptableObject { public List dungeonDataclassList; public List return_all_data() { return dungeonDataclassList; } public void initialize_so_data() { } // // // public void add_data(int position_x, int position_y, RoomType room_type, int id) // { // dungeonDataclassList.Add(new DungeonDataclass // { // position = new Vector2Int(position_x, position_y), // roomType = room_type, // id = id // }); // } // // public DungeonDataclass get_data_by_id(int id) // { // foreach (DungeonDataclass item in dungeonDataclassList) // { // if (item.id == id) // { // return item; // } // } // // return null; // 找不到则返回null // } // // public void remove_data_by_id(int id) // { // foreach (DungeonDataclass item in dungeonDataclassList) // { // if (item.id == id) // { // dungeonDataclassList.Remove(item); // return; // } // } // } }