public void ResetRoom() { roomID = 0; totalLayers = 0; roomName = "New Room"; creatorName = "Created By: "; levelType = LevelType.None; roomInPath = RoomInPath.None; roomType = RoomType.None; roomSize = new Vector2Int(20, 20);; roomPosition = new Vector2Int(0, 0); roomTilemaps.Clear(); tilesPosition = new Dictionary <Vector2Int, TileBase>(); tilesPosition.Clear(); roomTilemaps = new List <Dictionary <Vector2Int, TileBase> >(); roomTilemaps.Clear(); }
public void LoadFromScriptable(RuntimeRoom _runtimeRoom) { roomID = _runtimeRoom.roomID; totalLayers = _runtimeRoom.totalLayers; roomName = _runtimeRoom.roomName; creatorName = _runtimeRoom.creatorName; levelType = _runtimeRoom.levelType; roomInPath = _runtimeRoom.roomInPath; roomType = _runtimeRoom.roomType; roomSize = _runtimeRoom.roomSize; roomPosition = _runtimeRoom.roomPosition; roomTilemaps = _runtimeRoom.roomTilemaps; tilesPosition = _runtimeRoom.tilesPosition; roomTilemaps = _runtimeRoom.roomTilemaps; //Gets the collision and Trigger layers collisionLayer = _runtimeRoom.collisionLayer; triggerLayer = _runtimeRoom.triggerLayer; }