Merge branch 'roomGen'

This commit is contained in:
2025-06-27 07:15:26 +02:00
12 changed files with 426 additions and 160 deletions

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 78cd8de59ec022844907c273b05c0395
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -187,8 +187,8 @@ Transform:
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1.8, y: 1.8, z: 1.8}
m_ConstrainProportionsScale: 0
m_LocalScale: {x: 1.5, y: 1.5, z: 1.5}
m_ConstrainProportionsScale: 1
m_Children:
- {fileID: 1872598832695960773}
- {fileID: 1302341320372733696}

View File

@@ -0,0 +1,14 @@
using UnityEngine;
[CreateAssetMenu(fileName = "MapLayout", menuName = "Scriptable Objects/MapLayout")]
public class MapLayout : ScriptableObject
{
/// <summary>
/// 2D grid. Ka<4B>d<EFBFBD> <20><>dek je jeden <20><><EFBFBD>dek<65> mapy, naho<68>e = vy<76><79><EFBFBD> Z.
/// <20><>slice = index prefab-u v MapGenManager.mapPrefab,
/// '-' = pr<70>zdn<64> m<>sto,
/// 'S' = startovn<76> m<>stnost.
/// </summary>
[TextArea(5, 20)]
public string grid;
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 990d24eb53743184e9b379e68eec63e1

View File

@@ -1,11 +1,23 @@
using UnityEngine;
public class CreateEntrances : MonoBehaviour
///<summary>
/// Object handling Room logic
///</summary>
///
public class RoomHandler : MonoBehaviour
{
[SerializeField] private GameObject wallNorth;
[SerializeField] private GameObject wallSouth;
[SerializeField] private GameObject wallEast;
[SerializeField] private GameObject wallWest;
/// <summary>
/// Creates entrances to corridors leading to other rooms
/// </summary>
/// <param name="northOpen"></param>
/// <param name="southOpen"></param>
/// <param name="eastOpen"></param>
/// <param name="westOpen"></param>
public void SetEntrances(bool northOpen, bool southOpen, bool eastOpen, bool westOpen)
{
wallNorth.SetActive(!northOpen);