////////////////////////////////////////// /// THESE NEED TO BE IN A DIFFFERNT SCRIPT private void AttachMapPiecesToWorldNode(WorldNode worldNode) { int mapCount = 0; foreach (MapNode mapNode in worldNode.mapNodes) { mapNode.entrance = true; Vector3 nodeVect = mapNode.nodeLocation; int mapSize = mapNode.nodeSize; int layerCount = mapNode.nodeLayerCount; int rotation = mapNode.nodeRotation; int mapType = mapNode.nodeMapType; int mapPiece = mapCount; // for the players small ship if (mapCount == 4) { mapNode.playerShipMapPART1 = true; } if (mapCount == 13) { mapNode.playerShipMapPART2 = true; } _gridBuilder.BuildLocationGrid(mapNode, mapSize); List <Vector3> mapPieceNodes = _gridBuilder.GetGridNodePositions(); _mapPieceBuilder.SetWorldNodeNeighboursForDock(worldNode.neighbours); // for the ship docks _mapPieceBuilder.AttachMapPieceToMapNode(mapNode, mapPieceNodes, layerCount, mapSize, mapType, mapPiece, rotation); _locationManager.AddCubeScriptToLocationLookup(_gridBuilder.GetGridLocations()); // needs to be after AttachMapPieceToMapNode _mapPieceBuilder.SetPanelsNeighbours(); mapNode.mapFloorData = _mapPieceBuilder.GetMapFloorData(); mapNode.mapVentData = _mapPieceBuilder.GetMapVentData(); mapCount++; } _gameManager.StartGame(worldNode.nodeLocation); // <<<<<< start the f*****g game bitch }