Level Generator
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 78cd8de59ec022844907c273b05c0395
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,14 @@
|
||||
using UnityEngine;
|
||||
|
||||
[CreateAssetMenu(fileName = "MapLayout", menuName = "Scriptable Objects/MapLayout")]
|
||||
public class MapLayout : ScriptableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 2D grid. Každý øádek je jeden “øádek” mapy, nahoøe = vyšší Z.
|
||||
/// Èíslice = index prefab-u v MapGenManager.mapPrefab,
|
||||
/// '-' = prázdné místo,
|
||||
/// 'S' = startovní místnost.
|
||||
/// </summary>
|
||||
[TextArea(5, 20)]
|
||||
public string grid;
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 990d24eb53743184e9b379e68eec63e1
|
||||
+13
-1
@@ -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);
|
||||
Reference in New Issue
Block a user