Esempio n. 1
0
        public IEnumerator Init(StatBoard.PlayerStatData statData)
        {
            m_nameText.SetText(statData.name);
            Color color = statData.ally ? m_statData.allyColor : m_statData.opponentColor;

            m_nameText.color       = color;
            m_bestPlayerText.color = color;
            m_crownImage.set_color(color);
            GameStatistics.Types.PlayerStats playerStats = statData.playerStats;
            bool flag = statData.playerStats.Titles.Contains(0);

            m_bestPlayerText.get_gameObject().SetActive(flag);
            float num = flag ? m_statData.illuMvpScale : m_statData.illuNeutralScale;

            m_illuContainer.set_localScale(Vector3.get_one() * num);
            int num2 = default(int);

            if (playerStats.Stats.TryGetValue(12, ref num2))
            {
                m_deadIcon.get_gameObject().SetActive(num2 > 0);
            }
            else
            {
                m_deadIcon.get_gameObject().SetActive(true);
            }
            yield return(LoadIllu(statData.weaponDefinition));
        }
Esempio n. 2
0
        public void Init(StatBoard.PlayerStatData statData, FightStatType type)
        {
            //IL_0092: Unknown result type (might be due to invalid IL or missing references)
            //IL_009f: Unknown result type (might be due to invalid IL or missing references)
            //IL_00a4: Unknown result type (might be due to invalid IL or missing references)
            //IL_00ab: Unknown result type (might be due to invalid IL or missing references)
            int num = default(int);

            if (statData.playerStats.Stats.TryGetValue((int)type, ref num))
            {
                if (type == FightStatType.PlayTime)
                {
                    TimeSpan timeSpan = TimeSpan.FromSeconds(num);
                    string   text     = (timeSpan.Hours > 0) ? timeSpan.ToString("hh\\:mm\\:ss") : timeSpan.ToString("mm\\:ss");
                    m_valueText.SetText(text);
                }
                else
                {
                    m_valueText.SetText(num.ToString());
                }
            }
            else
            {
                m_valueText.SetText("-");
            }
            Color color = statData.playerStats.Titles.Contains((int)type) ? m_statData.bestValueColor : m_statData.neutralValueColor;

            m_valueText.color = color;
        }
Esempio n. 3
0
        private void InitList(List <StatValue> stats, LayoutGroup group, List <StatBoard.PlayerStatData> statDatas, FightStatType type)
        {
            int num = 0;

            for (int i = 0; i < statDatas.Count; i++)
            {
                StatBoard.PlayerStatData statData = statDatas[i];
                if (i >= stats.Count)
                {
                    StatValue statValue = Object.Instantiate <StatValue>(stats[0]);
                    statValue.get_transform().SetParent(group.get_transform());
                    stats.Add(statValue);
                }
                StatValue statValue2 = stats[i];
                statValue2.Init(statData, type);
                statValue2.get_gameObject().SetActive(true);
                num++;
            }
            for (int j = num; j < stats.Count; j++)
            {
                stats[j].get_gameObject().SetActive(false);
            }
        }
Esempio n. 4
0
        private IEnumerator InitList(List <StatPlayer> stats, LayoutGroup group, List <StatBoard.PlayerStatData> statDatas)
        {
            int statDataCount = 0;

            for (int i = 0; i < statDatas.Count; i++)
            {
                StatBoard.PlayerStatData statData = statDatas[i];
                if (i >= stats.Count)
                {
                    StatPlayer statPlayer = Object.Instantiate <StatPlayer>(stats[0]);
                    statPlayer.get_transform().SetParent(group.get_transform());
                    stats.Add(statPlayer);
                }
                StatPlayer stat = stats[i];
                yield return(stat.Init(statData));

                stat.get_gameObject().SetActive(true);
                statDataCount++;
            }
            for (int j = statDataCount; j < stats.Count; j++)
            {
                stats[j].get_gameObject().SetActive(false);
            }
        }