Skip to content
Snippets Groups Projects
Commit e3a1370b authored by Robin Ruud Kristensen's avatar Robin Ruud Kristensen
Browse files

added doors being deleted when the door have been used

parent d50963a6
No related branches found
No related tags found
1 merge request!79Ruud1
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment