public void FinishQuest()
 {
     myParty  = PartyGenerator.GenerateRandomParty();
     myResult = myQuest.GetResult(myParty);
     questPopup.GetComponent <Canvas>().enabled = true;
     questResults.GetComponent <QuestResultBox>().Display(myResult);
 }
Пример #2
0
    public void generateWorld()
    {
        Debug.Log("generating world");
        Physics.gravity            = new Vector3(0, 0, 1f);
        this.mapGenerationSettings = MapGenerationSettings.loadSettings(applicationPersistentPath);
        this.mapData = MapData.loadData(applicationPersistentPath);
        UIController.getInstance().updateSettingsPanel(this.mapGenerationSettings, 0);
        Map map = MapGenerator.generateMap(0, mapGenerationSettings, mapData, applicationPersistentPath, this.randomGenerator);

        //UIController.getInstance().setCameraPosition(HexMathHelper.hexToWorldCoords(MapGenerator.mapCenter(this.mapGenerationSettings), MeshMapController.getInstance().getHexSize()));
        MeshMapController.getInstance().map = map;
        MeshMapController.getInstance().drawMap();

        this.partyGenerationSettings = PartyGenerationSettings.loadSettings(applicationPersistentPath);
        Party party = PartyGenerator.getInstance().generateParty(applicationPersistentPath, this.partyGenerationSettings);

        PartyController.getInstance().party = party;
        PartyController.getInstance().setInitialPosition(MapGenerator.mapCenter(this.mapGenerationSettings));

        UIController.getInstance().showPartyInfo();

        UIController.getInstance().startingMenuPanel.SetActive(false);
        UIController.getInstance().inGamePanel.SetActive(true);

        this.currentTime = this.partyGenerationSettings.nightTime;
    }
Пример #3
0
    public static PartyGenerator getInstance()
    {
        if (instance == null)
        {
            instance = new PartyGenerator();
        }

        return(instance);
    }