Beispiel #1
0
        public bool CompareSeaMonster(SeaMonster lft, SeaMonster rgt)
        {
            if (lft == null || rgt == null)
            {
                return(lft == rgt);
            }

            return(lft.SwimSpeed == rgt.SwimSpeed &&
                   CompareMonster(lft, rgt));
        }
Beispiel #2
0
        public SeaMonster CreateSeaMonster()
        {
            Monster    tmp    = CreateMonster();
            SeaMonster result = new SeaMonster();

            CopyMonster(tmp, result);
            result.SwimSpeed = (short)mRandom.Next();

            return(result);
        }
Beispiel #3
0
        static List <SeaMonster> DeserializeSeaMonsterList(BinaryReader reader)
        {
            int len = reader.ReadInt32();
            List <SeaMonster> result = new List <SeaMonster>(len);

            for (int i = 0; i < len; i++)
            {
                SeaMonster mons = new SeaMonster();
                mons.Deserialize(reader);
                result.Add(mons);
            }

            return(result);
        }