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


C# GenericWriter.WriteEntity方法代码示例

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


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

示例1: Serialize

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

            writer.Write( (int) 0 ); // version

            writer.Write( m_EffectDelay );
            writer.Write( m_TriggerDelay );
            writer.Write( m_SoundDelay );

            writer.WriteEntity( m_Source );
            writer.WriteEntity( m_Target );

            /*
            if ( m_Source is Item )
                writer.Write( m_Source as Item );
            else
                writer.Write( m_Source as Mobile );

            if ( m_Target is Item )
                writer.Write( m_Target as Item );
            else
                writer.Write( m_Target as Mobile );
            */
            writer.Write( m_Trigger as Item );

            writer.Write( m_FixedDirection );
            writer.Write( m_Explodes );
            writer.Write( m_PlaySoundAtTrigger );

            writer.WriteEncodedInt( (int) m_EffectType );
            writer.WriteEncodedInt( (int) m_EffectLayer );
            writer.WriteEncodedInt( (int) m_TriggerType );

            writer.WriteEncodedInt( m_ItemID );
            writer.WriteEncodedInt( m_Hue );
            writer.WriteEncodedInt( m_RenderMode );
            writer.WriteEncodedInt( m_Speed );
            writer.WriteEncodedInt( m_Duration );
            writer.WriteEncodedInt( m_ParticleEffect );
            writer.WriteEncodedInt( m_ExplodeParticleEffect );
            writer.WriteEncodedInt( m_ExplodeSound );
            writer.WriteEncodedInt( m_Unknown );
            writer.WriteEncodedInt( m_SoundID );
            writer.WriteEncodedInt( m_TriggerRange );
        }
开发者ID:kamronbatman,项目名称:Defiance-AOS-Pre-2012,代码行数:46,代码来源:EffectController.cs


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