コード例 #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 AttachMapPieceToConnectorNode(ConnectorNode connectNode)
    {
        Vector3 nodeVect = connectNode.NodeStaticLocation;
        int     mapSize  = connectNode.NodeSize;
        int     rotation = connectNode.NodeStaticRotation;
        int     mapType  = connectNode.NodeMapType;
        int     mapPiece = connectNode.NodeMapPiece;

        GridBuilder.BuildLocationGrid(connectNode, mapSize);
        List <Vector3> mapPieceNodes = GridBuilder.GetGridNodeStartPositions();

        MapPieceBuilder.AttachMapPieceToMapNode(connectNode, mapPieceNodes, mapSize, mapType, mapPiece, rotation);
        MapPieceBuilder.SetPanelsNeighbours();
        //connectNode.mapFloorData = _mapPieceBuilder.GetMapFloorData();
        //connectNode.mapVentData = _mapPieceBuilder.GetMapVentData();
    }
コード例 #3
0
    private static void AttachMapPieceToMapNode(MapNode mapNode)
    {
        Vector3 nodeVect = mapNode.NodeStaticLocation;
        int     mapSize  = mapNode.NodeSize;
        int     rotation = mapNode.NodeStaticRotation;
        int     mapType  = mapNode.NodeMapType;
        int     mapPiece = mapNode.NodeMapPiece;

        GridBuilder.BuildLocationGrid(mapNode, mapSize);
        List <Vector3> mapPieceNodes = GridBuilder.GetGridNodeStartPositions();

        MapPieceBuilder.AttachMapPieceToMapNode(mapNode, mapPieceNodes, mapSize, mapType, mapPiece, rotation);
        MapPieceBuilder.SetPanelsNeighbours();
        //mapNode.RemoveDoorPanels();
        //mapNode.mapFloorData = MapPieceBuilder.MapFloorData;
        //mapNode.mapVentData = MapPieceBuilder.MapVentData;
    }
コード例 #4
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
    }
コード例 #5
0
 private static void AttachMapToMapNode(MapNode mapNode)
 {
     MapPieceBuilder.BuildMap(mapNode);
     MapPieceBuilder.SetPanelsNeighbours();
 }