
로그라이크 방 오브젝트 생성방이 생성될 때 해당 방 타입에 맞는 오브젝트 생성 [아이템, 장애물, 적]기능 구현RoomBlueprint.cs[CreateAssetMenu(fileName = "RoomBlueprint", menuName = "Blueprint/Room")]public class RoomBlueprint : ScriptableObject{ [SerializeField] private Sprite floor; [SerializeField] private bool isReward; [Header("Object Position")] [SerializeField] private Vector2 rewardPosition; [SerializeField] private Lis..

기능 구현MoveToDesignativeRoom/// /// 방에 진입할 시, 좌표 설정 및 문 활성화 체크/// /// 들어간 방향/// 카메라 움직임 딜레이private IEnumerator MoveToDesignativeRoom(Vector2Int MoveDirection){ int x = _currentRoom.Coordinate.x + MoveDirection.y; int y = _currentRoom.Coordinate.y + MoveDirection.x; _currentRoom = _roomArray[x, y]; _currentRoom.OpenActivatedDoor(); Main.Game.Player.transform.position += new Vector3(M..

📌 연결된 문 생성 📄 Dungeon.cs private void CreateDungeon(){ // 방 생성을 위한 좌표 리스트 List alternativeRoomList = new(); List hasBeenRemoveRoomList = new(); // 특수 방 리스트 List specialRoomList = new(); ... ... ... LinkDoors(); // 방 문이 1개인 경우 => 특수 방으로 추가 foreach (Room room in _roomArray) { if (room != null && room.ActiveDoorCount == 1 && room != currentRoom) {..

기능 구현GameScene.cspublic class GameScene : MonoBehaviour{ #region Field [SerializeField] private int roomAmount; private Room _roomPrefab; private Room[,] _roomArray = new Room[20, 20]; #endregion #region Init private void Start() { Main.Resource.Initialize(); // #1. 방 생성 _roomPrefab = Main.Resource.GetObject("Room").GetComponent(); CreateLevel(..