本文整理汇总了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);
}
示例2: Serialize
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
int version = writer.SetVersion(0);
switch (version)
{
case 0:
{
writer.WriteType(House);
}
break;
}
}
示例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;
}
}
示例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;
}
}
示例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;
}
示例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;
}
示例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;
}
}
示例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;
}
}
示例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;
}
示例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;
}
}
示例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;
}
}
示例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);
}
}
}
示例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;
}
}
示例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;
}
}
示例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);
}
}
}