Exemplo n.º 1
0
    public override void LoadDataInternal()
    {
        IServerData server = MainData.CurrentServerData;

        UnitAttributeStats stats      = server.GetAttributeStats(statType);
        IPlayerData        playerData = MainData.CurrentPlayerData;

        statNameText.text = statName;

        float statValue = playerData.GetStat(statType);

        slider.value       = stats.GetSliderValue(playerData.Level, statValue);
        statValueText.text = statValue.ToString();
    }
Exemplo n.º 2
0
    protected override void LoadDataInternal()
    {
        IServerData server = Main.ServerData;

        UnitAttributeStats stats    = server.GetAttributeStats(statType);
        HeroData           heroData = Main.GameState.CurrentHeroData;

        statNameText.text = statName;

        if (heroData != null && stats != null)
        {
            float statValue = heroData.GetStat(statType);
            slider.value       = stats.GetSliderValue(heroData.Level, statValue);
            statValueText.text = statValue.ToString();
        }
        else
        {
            slider.value       = 0;
            statValueText.text = "?";
        }
    }