当前位置: 首页>>代码示例>>C#>>正文


C# GenericWriter.WriteType方法代码示例

本文整理汇总了C#中GenericWriter.WriteType方法的典型用法代码示例。如果您正苦于以下问题:C# GenericWriter.WriteType方法的具体用法?C# GenericWriter.WriteType怎么用?C# GenericWriter.WriteType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在GenericWriter的用法示例。


在下文中一共展示了GenericWriter.WriteType方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Serialize

		public override void Serialize( GenericWriter writer )
		{
			base.Serialize( writer );

			writer.Write( 0 ); // version

            writer.WriteType(EtherealType);
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:8,代码来源:EtherealCharcoalDeed.cs

示例2: Serialize

		public override void Serialize(GenericWriter writer)
		{
			base.Serialize(writer);

			int version = writer.SetVersion(0);

			switch (version)
			{
				case 0:
					{
						writer.WriteType(House);
					}
					break;
			}
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:15,代码来源:HousePlacementConquest.cs

示例3: Serialize

		public override void Serialize(GenericWriter writer)
		{
			base.Serialize(writer);

			int version = writer.SetVersion(0);

			switch (version)
			{
				case 0:
					{
						writer.WriteType(Spell);
						writer.Write(ChangeSpellReset);
					}
					break;
			}
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:16,代码来源:SuccessfulSpellConquest.cs

示例4: Serialize

		public override void Serialize(GenericWriter writer)
		{
			base.Serialize(writer);

			int version = writer.SetVersion(0);

			switch (version)
			{
                case 0:
                    {
                        writer.WriteType(Battle);
                        writer.Write(BattleChildren);
                        writer.Write(ChangeBattleReset);
                    }
					break;
			}
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:17,代码来源:EventKillConquest.cs

示例5: SerializePortals

        private static bool SerializePortals(GenericWriter writer)
        {
            writer.SetVersion(0);

            writer.WriteBlockDictionary(
                PortalList,
                (key, val) => writer.WriteType(
                    val,
                    t =>
                    {
                        if (t != null)
                        {
                            val.Serialize(writer);
                        }
                    }));

            return true;
        }
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:18,代码来源:Portals_Init.cs

示例6: SerializeZombieEvent

        private static bool SerializeZombieEvent(GenericWriter writer)
        {
            writer.SetVersion(0);

            writer.WriteBlockDictionary(
                ZombieEvents,
                (key, val) => writer.WriteType(
                    val,
                    t =>
                    {
                        if (t != null)
                        {
                            val.Serialize(writer);
                        }
                    }));

            return true;
        }
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:18,代码来源:ZombieEvent_Init.cs

示例7: Serialize

		public override void Serialize(GenericWriter writer)
		{
			base.Serialize(writer);

			int version = writer.SetVersion(0);

			switch (version)
			{
				case 0:
					{
						writer.WriteType(ItemType);
						writer.Write(ItemChildren);
						writer.Write(ItemChangeReset);

						writer.WriteFlag(Resource);

						writer.WriteType(HarvestSystem);
					}
					break;
			}
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:21,代码来源:HarvestConquest.cs

示例8: Serialize

		public override void Serialize(GenericWriter writer)
		{
			base.Serialize(writer);

			int version = writer.SetVersion(0);

			switch (version)
			{
				case 0:
					{
						writer.WriteType(Object);
						writer.Write(ObjectChildren);
						writer.Write(ObjectChangeReset);

						writer.WriteFlag(ObjectNameSearch);
						writer.Write(ObjectNameIgnoreCaps);
						writer.Write(ObjectNameReq);
						writer.Write(ObjectNameChangeReset);

						writer.Write(ObjectHueReq);
						writer.Write(ObjectHueChangeReset);
					}
					break;
			}
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:25,代码来源:ObtainConquest.cs

示例9: SerializeConquestRegistry

        private static bool SerializeConquestRegistry(GenericWriter writer)
        {
            int version = writer.SetVersion(0);

            switch (version)
            {
                case 0:
                {
                    writer.WriteBlockDictionary(
                        ConquestRegistry,
                        (key, val) => writer.WriteType(
                            val,
                            t =>
                            {
                                if (t != null)
                                {
                                    val.Serialize(writer);
                                }
                            }));
                }
                    break;
            }

            return true;
        }
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:25,代码来源:Conquests_Init.cs

示例10: Serialize

		public override void Serialize(GenericWriter writer)
		{
			base.Serialize(writer);

			int version = writer.SetVersion(3);

			switch (version)
			{
                    case 3:
			        {
			            writer.Write(IsDuel);
                        writer.Write(IsDungeon);
                    }
                    goto case 2;
                case 2:
                    {
                        writer.WriteType(Battle);
                        writer.Write(BattleChildren);
                        writer.Write(ChangeBattleReset);

                        writer.Write(Map);
                        writer.Write(RegionName);
                    }
                    goto case 1;
				case 1:
					{
						writer.WriteFlag(AccessPlayer);
						writer.WriteFlag(AccessKiller);
					}
					goto case 0;
				case 0:
					{
						writer.WriteFlag(NotoCompare);
						writer.WriteFlag(NotoPlayer);
						writer.WriteFlag(NotoKiller);
					}
					break;
			}
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:39,代码来源:PlayerKillConquest.cs

示例11: Serialize

        public override void Serialize(GenericWriter writer)
        {
            base.Serialize(writer);

            int version = writer.SetVersion(1);

            UID.Serialize(writer);

            switch (version)
            {
                case 1:
                {
                    writer.Write(Plat);
                    goto case 0;
                }
                case 0:
                {
                    writer.Write(InvaderTitles);
                    writer.Write(TimeLimit);
                    writer.Write(SpawnAmount);
                    writer.Write(KillAmount);

                    writer.Write(Creatures.Count);

                    if (Creatures.Count > 0)
                    {
                        foreach (Type creature in Creatures)
                        {
                            writer.WriteType(creature);
                        }
                    }
                }
                    break;
            }
        }
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:35,代码来源:Level.cs

示例12: Serialize

        public override void Serialize(GenericWriter writer)
        {
            base.Serialize(writer);

            writer.Write((int) 0); // version
            writer.Write(Completed);
            writer.Write(WrongStep);
            writer.Write(ContainsFlesh);
            writer.Write(ContainsTentacles);
            writer.Write(ContainsVitriol);
            writer.Write(ContainsWings);

            writer.Write(Contains.Count);

            if (Contains.Count > 0)
            {
                foreach (var item in Contains)
                {
                    writer.WriteType(item);
                }
            }
        }
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:22,代码来源:MortarPestle.cs

示例13: Serialize

		public override void Serialize(GenericWriter writer)
		{
			base.Serialize(writer);

			int version = writer.SetVersion(2);

			switch (version)
			{
                case 2:
                    {
                        writer.WriteFlag(KeywordSearch);
                        writer.Write(KeywordIgnoreCaps);
                        writer.Write(KeywordReq);
                        writer.Write(KeywordChangeReset);
                    }
			        goto case 1;
				case 1:
					{
						writer.Write(CheckAmount);
					}
					goto case 0;
				case 0:
					{
						writer.WriteType(Item);
						writer.Write(ItemChildren);
						writer.Write(ItemChangeReset);
					}
					break;
			}
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:30,代码来源:ItemConquest.cs

示例14: Serialize

		public override void Serialize(GenericWriter writer)
		{
			base.Serialize(writer);

			int version = writer.SetVersion(0);

			switch (version)
			{
				case 0:
					{
						writer.WriteType(Creature);
						writer.Write(Children);
						writer.Write(ChangeCreatureReset);

                        writer.WriteType(Item);
                        writer.Write(ItemChildren);
                        writer.Write(ItemChangeReset);

                        writer.Write(IsDungeon);
                        writer.Write(PlayerTarget);
					}
					break;
			}
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:24,代码来源:StealingConquest.cs

示例15: Serialize

        public override void Serialize(GenericWriter writer)
        {
            base.Serialize(writer);

            writer.Write((int) 0); // version
            writer.Write(Completed);
            writer.Write(WrongStep);
            writer.Write(ContainsSeed);
            writer.Write(ContainersClaw);
            writer.Write(ContainsCarapace);
            writer.Write(ContainsConcoction);

            writer.Write(Contains.Count);

            if (Contains.Count > 0)
            {
                foreach (var item in Contains)
                {
                    writer.WriteType(item);
                }
            }
        }
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:22,代码来源:PewterBowl.cs


注:本文中的GenericWriter.WriteType方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。