Beispiel #1
0
        public static Berserk GetBerserk(string name)
        {
            for (int i = 0; i < m_Berserks.Count; ++i)
            {
                Berserk p = m_Berserks[i];

                if (Utility.InsensitiveCompare(p.Name, name) == 0)
                {
                    return(p);
                }
            }

            return(null);
        }
Beispiel #2
0
        public static Berserk GetBerserk(int level)
        {
            for (int i = 0; i < m_Berserks.Count; ++i)
            {
                Berserk p = m_Berserks[i];

                if (p.Level == level)
                {
                    return(p);
                }
            }

            return(null);
        }
Beispiel #3
0
        public static Berserk Parse(string value)
        {
            Berserk p = null;

            int plevel;

            if (int.TryParse(value, out plevel))
            {
                p = GetBerserk(plevel);
            }

            if (p == null)
            {
                p = GetBerserk(value);
            }

            return(p);
        }
Beispiel #4
0
 public static void Register(Berserk reg)
 {
     m_Berserks.Add(reg);
 }