diff --git a/MrBigsock/Assets/Code/FollowPlayer.cs b/MrBigsock/Assets/Code/FollowPlayer.cs index cce2166e4432144c3c37c7350f994ea44f973757..6f178e01850ac03da8d9eb4807a5fa1507a04488 100644 --- a/MrBigsock/Assets/Code/FollowPlayer.cs +++ b/MrBigsock/Assets/Code/FollowPlayer.cs @@ -16,6 +16,8 @@ namespace Bigsock private CinemachineConfiner2D cameraMap; Vector3 offset = new Vector3(0, 0, -10); + int i = 0; + void Start() { @@ -31,5 +33,12 @@ namespace Bigsock i++; } } + + private void OnDestroy() + { + NeighbourMapGenerator.ClearRoomList(); + TilemapGenerator.SetRoomIDZero(); + TilemapGenerator.resetMaps(); + } } }