示例#1
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();

            switch (version)
            {
            case 1:
            {
                int len = reader.ReadInt();
                for (int i = 0; i < len; i++)
                {
                    string       type     = reader.ReadString();
                    Type         teamType = Type.GetType(type, true, true);
                    object[]     args     = new object[] { this, "" };
                    BaseGameTeam team     = (BaseGameTeam)Activator.CreateInstance(teamType, args);
                    team.Deserialize(reader);
                    m_Teams.Add(team);
                    if (Open)
                    {
                        team.CreateMoongate();
                    }
                }
                break;
            }
            }
        }