Beispiel #1
0
    void getGameData()
    {
        //Clear it out
        //Array.Clear(gameData, 0, gameData.Length);
        //then refresh it
        string returnedGameData = dm.returnGameData();

        gameData = returnedGameData.Split(',');
    }
Beispiel #2
0
    public void updateMainGamePanel()
    {
        //Read the game data file
        returnedGameData = dm.returnGameData();

        //Split it by commas
        gameData = returnedGameData.Split(',');

        //Update the main game panel text boxes
        money.text             = gameData[0];
        portsOwned.text        = gameData[1];
        crewHired.text         = gameData[2];
        silverItemsOwned.text  = gameData[3];
        potteryItemsOwned.text = gameData[4];
    }
    private void Start()
    {
        if (travelManager.currentPort != null)
        {
            TradeButton.interactable = true;
        }

        doITakeMoney = false;

        dm = new dataManager();
        string returnedPorts        = dm.returnAllPorts();
        string returnedMarketForces = dm.returnMarketForces();
        string returnedGameData     = dm.returnGameData();

        port     = returnedPorts.Split('_');
        forces   = returnedMarketForces.Split(',');
        gameData = returnedGameData.Split(',');

        disableButton();

        populatePortDetails();
    }