Exemple #1
0
    public List <string> GetLevelStats(int _levelUrlNum, StatsType _statName)
    {
        List <string> _tempStrings = new List <string>();

        if (!CheckXML(FileUrls[_levelUrlNum]))
        {
            return(_tempStrings);
        }

        XmlReader reader = XmlReader.Create(FileUrls[_levelUrlNum]);

        while (reader.Read())
        {
            if (reader.Name == _statName.ToString())
            {
                if (reader.GetAttribute("A") == null)
                {
                    Debug.LogError("MenuXML found no A Attribute on given stat in lsGetLevelStats");
                    break;
                }

                _tempStrings.Add(reader.GetAttribute("A"));
                _tempStrings.Add(reader.GetAttribute("B"));
                _tempStrings.Add(reader.GetAttribute("C"));
                _tempStrings.Add(reader.GetAttribute("D"));
                _tempStrings.Add(reader.GetAttribute("E"));
                _tempStrings.Add(reader.GetAttribute("F"));
            }
        }
        reader.Close();

        return(_tempStrings);
    }
Exemple #2
0
        public void SaveStats(StatsType stats)
        {
            int currentStats = GetStats(stats);

            currentStats++;
            PlayerPrefs.SetInt(stats.ToString(), currentStats);
        }
        protected override string RequestUrl()
        {
            string sUrl = "/common/arenaDetails.asp?outputType=XML&actionType=view";

            if (ArenaId != 0)
            {
                sUrl += "&arenaID=" + ArenaId;
            }
            if (StatsType != ArenaDetailsRequest.StatsTypeEnum.MyArena)
            {
                sUrl += "&StatsType=" + StatsType.ToString();
            }
            if (MatchType != ArenaDetailsRequest.MatchTypeEnum.All)
            {
                sUrl += "&MatchType=" + MatchType.ToString();
            }
            if (FirstDate != DateTime.MinValue)
            {
                sUrl += "&FirstDate=" + FirstDate.ToString("yyyy-MM-dd HH:mm:ss");
            }
            if (LastDate != DateTime.MinValue)
            {
                sUrl += "&LastDate=" + LastDate.ToString("yyyy-MM-dd HH:mm:ss");
            }
            if (StatsLeagueID != 0)
            {
                sUrl += "&StatsLeagueID=" + StatsLeagueID;
            }

            return(sUrl);
        }
Exemple #4
0
    // Token: 0x060002AA RID: 682 RVA: 0x00012828 File Offset: 0x00010A28
    public override string ToString()
    {
        string[] array = new string[5];
        array[0] = "{ Id=";
        int       num = 1;
        StatsType id  = this.Id;

        array[num] = ((id != null) ? id.ToString() : null);
        array[2]   = "Value=";
        array[3]   = (this.IsStringData() ? this.StringValue : this.IntValue.ToString());
        array[4]   = " }";
        return(string.Concat(array));
    }
Exemple #5
0
        public void SaveStats(StatsType stats, int val, bool increment)
        {
            int currentStats = GetStats(stats);

            if (increment)
            {
                currentStats += val;
            }
            else
            {
                currentStats -= val;
            }
            PlayerPrefs.SetInt(stats.ToString(), currentStats);
        }
Exemple #6
0
        public void NotifyStat(StatsType stat, int value)
        {
            var col = ((int)stat) % 2;
            var row = ((int)stat) / 2;

            var rowTbl       = (TableLayoutPanel)tblStats.GetControlFromPosition(0, row);
            var col2         = 2 * col;
            var lblNameStat  = rowTbl.GetControlFromPosition(col2, 0);
            var lblValueStat = rowTbl.GetControlFromPosition(col2 + 1, 0);

            setTextAndRefresh(lblNameStat,
                              String.Format("{0}",
                                            stat.ToString()));
            setTextAndRefresh(lblValueStat,
                              String.Format("{0, 3} ({1})",
                                            value,
                                            value.ModifierOfStat().ToString("+#;-#;0")));
        }
Exemple #7
0
 public void SaveStats(StatsType stats, int val)
 {
     PlayerPrefs.SetInt(stats.ToString(), val);
 }
Exemple #8
0
 public int GetStats(StatsType stats)
 {
     return(PlayerPrefs.GetInt(stats.ToString(), 0));
 }
        public void NotifyStat(StatsType stat, int value)
        {
            var col = ((int)stat) % 2;
            var row = ((int)stat) / 2;

            var rowTbl = (TableLayoutPanel)tblStats.GetControlFromPosition(0, row);
            var col2 = 2 * col;
            var lblNameStat = rowTbl.GetControlFromPosition(col2, 0);
            var lblValueStat = rowTbl.GetControlFromPosition(col2 + 1, 0);
            setTextAndRefresh(  lblNameStat, 
                                String.Format(  "{0}", 
                                                stat.ToString()));
            setTextAndRefresh(  lblValueStat,
                                String.Format("{0, 3} ({1})",
                                                value,
                                                value.ModifierOfStat().ToString("+#;-#;0")));
        }