using System.Collections; using System.Collections.Generic; using UnityEngine; public class LoadRoomManager : MonoBehaviour { [Tooltip("Default Dungeon SO")] public DungeonHomeSO dungeonHomeSo; [Tooltip("BugStatus Room")] public GameObject roomBugStatue; [Tooltip("Center Position")] public GameObject startPositionObject; private void create_room(GameObject room_prefab, Vector3 m_create_position) { GameObject room = Instantiate(room_prefab, m_create_position, Quaternion.identity); room.name = $"room_{room.transform.position}"; } // Start is called before the first frame update void Start() { foreach (DungeonDataclass item in dungeonHomeSo.return_all_data()) { if (item.roomType == RoomType.BugStatueRoom) { // create_room(controllerRoomPrefab, new Vector3(item.positionX * 1f, item.positionY * 1f, 0)); create_room(roomBugStatue, startPositionObject.transform.position + new Vector3(item.positionX * item.roomSize, -item.positionY * item.roomSize, 0)); } } } // Update is called once per frame void Update() { } }