Beispiel #1
0
        public MatchTable Get(int iID)
        {
            MatchTable rkRet = null;

            if (!m_kMapDatas.TryGetValue(iID, out rkRet))
            {
                return(null);
            }
            return(rkRet);
        }
Beispiel #2
0
        public bool Load(string text)
        {
            JsonData jsonData = JsonMapper.ToObject(text);

            for (int i = 0; i < jsonData.Count; i++)
            {
                JsonData   data          = jsonData[i];
                MatchTable TableInstance = new MatchTable();
                JsonData   tempID        = data["ID"];
                TableInstance.ID = int.Parse(tempID.ToString());
                JsonData tempTimeFloor = data["TimeFloor"];
                TableInstance.TimeFloor = int.Parse(tempTimeFloor.ToString());
                JsonData tempFightLimit = data["FightLimit"];
                TableInstance.FightLimit = int.Parse(tempFightLimit.ToString());
                JsonData tempAI = data["AI"];
                TableInstance.AI = int.Parse(tempAI.ToString());
                ////////////////////
                m_kDatas.Add(TableInstance);
                m_kMapDatas.Add(TableInstance.ID, TableInstance);
            }

            return(true);
        }