本文整理汇总了C#中Buffer.DeSerialize方法的典型用法代码示例。如果您正苦于以下问题:C# Buffer.DeSerialize方法的具体用法?C# Buffer.DeSerialize怎么用?C# Buffer.DeSerialize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Buffer
的用法示例。
在下文中一共展示了Buffer.DeSerialize方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnDeSerialize
protected override bool OnDeSerialize(SimpleStream.SerializableDecoder decoder, SimpleStream stream)
{
bool ret = true;
try
{
ushort size = 0;
m_vfxs.Clear();
m_sfxs.Clear();
m_statusEffects.Clear();
m_blocks.Clear();
m_skills.Clear();
m_gameModes.Clear();
m_projectiles.Clear();
m_heroObjects.Clear();
m_monsters.Clear();
m_noticeObjects.Clear();
m_warpGates.Clear();
m_buffers.Clear();
m_debuffers.Clear();
m_lockObstacles.Clear();
m_slotMachines.Clear();
m_challengers.Clear();
m_stageObjects.Clear();
m_stages.Clear();
m_consumableTypes.Clear();
m_consumables.Clear();
m_screenPositions.Clear();
m_bufferActions.Clear();
m_slotMachineReels.Clear();
size = decoder.Decode2();
for (ushort i = 0; i < size; ++i)
{
VFX o = new VFX();
if (!o.DeSerialize(stream)) throw new Exception();
m_vfxs.Add(o.VfxID, o);
}
size = decoder.Decode2();
for (ushort i = 0; i < size; ++i)
{
SFX o = new SFX();
if (!o.DeSerialize(stream)) throw new Exception();
m_sfxs.Add(o.SfxID, o);
}
size = decoder.Decode2();
for (ushort i = 0; i < size; ++i)
{
StatusEffect o = new StatusEffect();
if (!o.DeSerialize(stream)) throw new Exception();
m_statusEffects.Add(o.StatusEffectCode, o);
}
size = decoder.Decode2();
for (ushort i = 0; i < size; ++i)
{
Block o = new Block();
if (!o.DeSerialize(stream)) throw new Exception();
m_blocks.Add(o.BlockID, o);
}
size = decoder.Decode2();
for (ushort i = 0; i < size; ++i)
{
Skill o = new Skill();
if (!o.DeSerialize(stream)) throw new Exception();
m_skills.Add(o.SkillCode, o);
}
size = decoder.Decode2();
for (ushort i = 0; i < size; ++i)
{
GameMode o = new GameMode();
if (!o.DeSerialize(stream)) throw new Exception();
m_gameModes.Add(o.Mode, o);
}
size = decoder.Decode2();
for (ushort i = 0; i < size; ++i)
{
Projectile o = new Projectile();
if (!o.DeSerialize(stream)) throw new Exception();
m_projectiles.Add(o.FieldObjectCode, o);
}
size = decoder.Decode2();
for (ushort i = 0; i < size; ++i)
{
HeroObject o = new HeroObject();
if (!o.DeSerialize(stream)) throw new Exception();
m_heroObjects.Add(o.FieldObjectCode, o);
}
size = decoder.Decode2();
for (ushort i = 0; i < size; ++i)
{
Monster o = new Monster();
//.........这里部分代码省略.........