예제 #1
0
파일: weenie.cs 프로젝트: bDekaru/Melt
 public void removeStat(eIidStat stat)
 {
     if (iidStats.ContainsKey(stat))
     {
         iidStats.Remove(stat);
     }
 }
예제 #2
0
        public sIidStat(StreamReader inputFile)
        {
            key = (eIidStat)Utils.readInt32(inputFile);

            if (!Enum.IsDefined(typeof(eIidStat), key))
            {
                Console.WriteLine("Unknown iidStat: {0}", key);
            }

            value = Utils.readInt32(inputFile);
        }
예제 #3
0
파일: weenie.cs 프로젝트: bDekaru/Melt
        public int getStat(eIidStat stat)
        {
            sIidStat entry;

            if (iidStats.TryGetValue(stat, out entry))
            {
                return(entry.value);
            }
            else
            {
                return(0);
            }
        }
예제 #4
0
파일: weenie.cs 프로젝트: bDekaru/Melt
        public void addOrUpdateStat(eIidStat stat, int value)
        {
            sIidStat entry;

            if (iidStats.TryGetValue(stat, out entry))
            {
                entry.value    = value;
                iidStats[stat] = entry;
            }
            else
            {
                entry = new sIidStat(stat, value);
                iidStats.Add(stat, entry);
            }
        }
예제 #5
0
 public sIidStat(eIidStat key, int value)
 {
     this.key   = key;
     this.value = value;
 }
예제 #6
0
파일: weenie.cs 프로젝트: bDekaru/Melt
 public bool hasStat(eIidStat stat)
 {
     return(iidStats.ContainsKey(stat));
 }