예제 #1
0
    //Used to confirm the settings of the game session
    public void ConfirmSetup()
    {
        SetupData newOrLoadedSession = SessionSetupTransfer.GetSetupDataAndDestroyInstance();

        if (newOrLoadedSession != null)
        {
            setupData = newOrLoadedSession;
        }
        setupData.SetSeed();
        if (!HexMetrics.noiseSource)
        {
            HexMetrics.noiseSource = noiseSource;
            HexMetrics.InitializeHashGrid(setupData.Seed);
        }

        worldGrid.CreateMap(setupData.mapCellCountX, setupData.mapCellCountY, true, true, true);
        worldController.Setup(worldGrid, setupData);
        shipGrid.Load(playerStartingGridMap, true);

        worldGrid.SetCameraBoundriesToMatchHexGrid();
        shipGrid.SetCameraBoundriesToMatchHexGrid();

        HexGridController.worldGrid        = worldGrid;
        HexGridController.playerShipGrid   = shipGrid;
        HexGridController.playerCrewParent = playerCrewParent;

        CreateHumanPlayer();
        MapTurnSystem.instance.DoFirstTurn();

        questController.StartFirstMainQuest();
    }
예제 #2
0
 public void SaveSetup() => SessionSetupTransfer.SetNewSession(setupData);