Exemplo n.º 1
0
    public void RefreshUI()
    {
        GameBean        gameData        = uiComponent.handler_Game.GetGameData();
        GameDataHandler gameDataHandler = uiComponent.handler_GameData;

        gameDataHandler.GetLevelLevelUpDataForSpeed(gameData.levelForSpeed, out float addSpeed, out long preSpeedGold);
        SetTextForAttribute(ui_TvSpeedLevel, ui_TvSpeedMoney, gameData.levelForSpeed, gameDataHandler.GetLevelMaxForSpeed(), preSpeedGold);
        SetButtonStatusForAttribute(ui_BtSpeedAdd, preSpeedGold);

        gameDataHandler.GetLevelLevelUpDataForNumber(gameData.levelForPirateNumber, out int addNumber, out long preNumberGold);
        SetTextForAttribute(ui_TvNumberLevel, ui_TvNumberMoney, gameData.levelForPirateNumber, gameDataHandler.GetLevelMaxForNumber(), preNumberGold);
        SetButtonStatusForAttribute(ui_BtNumberAdd, preNumberGold);

        gameDataHandler.GetLevelUpDataForGoldPrice(gameData.levelForGoldPrice, out int addPrice, out long prePriceGold);
        SetTextForAttribute(ui_TvGoldPriceLevel, ui_TvGoldPriceMoney, gameData.levelForGoldPrice, gameDataHandler.GetLevelMaxForGoldPrice(), prePriceGold);
        SetButtonStatusForAttribute(ui_BtGoldPriceAdd, prePriceGold);
    }