Added a basic GameHandler
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
|
||||
@@ -23,6 +24,8 @@ public class MapGenManager : MonoBehaviour
|
||||
[SerializeField] private int RoomDistance = 3;
|
||||
|
||||
private readonly Dictionary<Vector2Int, GameObject> gridToRoom = new();
|
||||
public event Action<MapGenManager> OnGenerationComplete;
|
||||
public IReadOnlyDictionary<Vector2Int, GameObject> GridToRoom => gridToRoom;
|
||||
|
||||
void Start() => GenerateFromLayout();
|
||||
|
||||
@@ -85,6 +88,8 @@ public class MapGenManager : MonoBehaviour
|
||||
RoomHandler rh = keyValuePair.Value.GetComponent<RoomHandler>();
|
||||
rh.ToggleAllDoors();
|
||||
}
|
||||
|
||||
OnGenerationComplete?.Invoke(this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user