コード例 #1
0
    //////////////////////////////////////////
    /// 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
    }
コード例 #2
0
    ////////////////////////////////////////////////

    private static void AttachMapsToWorldNode(WorldNode worldNode)
    {
        Debug.Log("f**k wtf AttachMapsToWorldNode");
        int mapCount = 0;

        foreach (MapNode mapNode in worldNode.mapNodes)
        {
            mapNode.entrance = true;

            MapPieceBuilder.SetWorldNodeNeighboursForDock(worldNode.neighbourVects); // for the ship docks
            AttachMapToMapNode(mapNode);
            mapCount++;
        }
    }
コード例 #3
0
    ////////////////////////////////////////////////

    private static void AttachMapPiecesToWorldNode(WorldNode worldNode)
    {
        int mapCount = 0;

        foreach (MapNode mapNode in worldNode.mapNodes)
        {
            mapNode.entrance = true;
            Vector3 nodeVect = mapNode.NodeStaticLocation;
            int     mapSize  = mapNode.NodeSize;
            int     rotation = mapNode.NodeStaticRotation;
            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.GetGridNodeStartPositions();
            MapPieceBuilder.SetWorldNodeNeighboursForDock(worldNode.neighbours); // for the ship docks
            MapPieceBuilder.AttachMapPieceToMapNode(mapNode, mapPieceNodes, mapSize, mapType, mapPiece, rotation);
            MapPieceBuilder.SetPanelsNeighbours();
            //mapNode.mapFloorData = MapPieceBuilder.MapFloorData;
            //mapNode.mapVentData = MapPieceBuilder.MapVentData;
            mapCount++;
        }


        //NetWorkManager.NetworkAgent.CmdTellServerToSpawnNetworkNodeContainer(PlayerManager.PlayerAgent.NetID, worldNode.NodeStaticLocation);// <<<< Dont think this should be here

        GameManager.StartGame(worldNode.NodeStaticLocation); // <<<<<< start the f*****g game bitch
    }