diff --git a/MrBigsock/Assets/Code/InteractionSystem/Door.cs b/MrBigsock/Assets/Code/InteractionSystem/Door.cs index 7ce964c2d521220b255d6fb35c7f625b237a1ec8..604867d67d80a89a257da3b9e9406e3f34718f51 100644 --- a/MrBigsock/Assets/Code/InteractionSystem/Door.cs +++ b/MrBigsock/Assets/Code/InteractionSystem/Door.cs @@ -14,6 +14,7 @@ namespace BigSock.Interact { private GameObject cameraPlayer; private int i = TilemapGenerator.NextRoom(); private GameObject boundary; + GameObject door; public string InteractionPrompt => _prompt; @@ -30,6 +31,8 @@ namespace BigSock.Interact { player.transform.position = TilemapGenerator.DoorLocaitonTransport(i); cameraPlayer.transform.position = player.transform.position; boundary.GetComponent<PolygonCollider2D>().SetPath(0, TilemapGenerator.GetRoomBoundary(i)); + door = GameObject.Find("ClosedDoor(Clone)"); + Destroy(door); return true; } return false;