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


C# RecordReader.ReadReference方法代码示例

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


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

示例1: ReadField

 internal override void ReadField(RecordReader reader)
 {
     while (!reader.IsEndOfSegment)
     {
         List.Add(reader.ReadReference(FormKindSet.Any));
     }
 }
开发者ID:unforbidable,项目名称:patcher,代码行数:7,代码来源:ReferenceArray.cs

示例2: ReadField

 internal override void ReadField(RecordReader reader)
 {
     Sound = reader.ReadReference(FormKindSet.SndrOnly);
     Type = (WeatherSoundType)reader.ReadInt32();
 }
开发者ID:unforbidable,项目名称:patcher,代码行数:5,代码来源:WeatherSoundItem.cs

示例3: ReadField

 internal override void ReadField(RecordReader reader)
 {
     Projectile = reader.ReadReference(FormKindSet.ProjOnly);
     Flags = (AmmoFlags)reader.ReadUInt32();
     Damage = reader.ReadSingle();
     Value = reader.ReadInt32();
 }
开发者ID:unforbidable,项目名称:patcher,代码行数:7,代码来源:Ammo.cs

示例4: ReadField

            internal override void ReadField(RecordReader reader)
            {
                // Read flags and skip 3 bytes
                Flags = (ConditionFlags)reader.ReadByte();
                reader.Seek(3);

                // Read either global variable reference or float
                if (Flags.HasFlag(ConditionFlags.UseGlobal))
                    Operand.GlobalVariable = reader.ReadReference(FormKindSet.GlobOnly);
                else
                    Operand.FloatValue = reader.ReadSingle();

                // Read function code and skip 2 bytes
                Function = (Function)reader.ReadUInt16();
                reader.Seek(2);

                // Warn if unknown function - no enum value is defined for it
                if (!Enum.IsDefined(typeof(Function), Function))
                    Log.Warning("Function '{0}' was not recorgnised and any of parameter references may have may get scrambled.", Function);

                // Find function signature
                var signature = SignatureProvider.Default.GetSignature(Function);

                // Read function params
                // References must be read with ReadReference function
                if (signature[0].IsReference)
                    Params.UInt32_0 = reader.ReadReference(signature[0].Reference);
                else
                    Params.Int32_0 = reader.ReadInt32();

                if (signature[1].IsReference)
                    Params.UInt32_1 = reader.ReadReference(signature[1].Reference);
                else
                    Params.Int32_1 = reader.ReadInt32();

                Target = (FunctionTarget)reader.ReadUInt32();
                TargetReference = reader.ReadReference(FormKindSet.Any);

                // Third parameter
                IntParam3 = reader.ReadInt32();
            }
开发者ID:unforbidable,项目名称:patcher,代码行数:41,代码来源:Condition.cs

示例5: ReadField

 internal override void ReadField(RecordReader reader)
 {
     Item = reader.ReadReference(FormKindSet.Any);
     Quantity = reader.ReadUInt32();
 }
开发者ID:unforbidable,项目名称:patcher,代码行数:5,代码来源:Cobj.cs

示例6: ReadField

            internal override void ReadField(RecordReader reader)
            {
                Flags = (ProjectileFlags)reader.ReadUInt16();
                Type = (ProjectileType)reader.ReadUInt16();
                Gravity = reader.ReadSingle();
                Speed = reader.ReadSingle();
                Range = reader.ReadSingle();
                Light = reader.ReadReference(FormKindSet.Any);
                MuzzleFlashLight = reader.ReadReference(FormKindSet.Any);
                TracerChance = reader.ReadSingle();
                AltExplosionTriggerProximity = reader.ReadSingle();
                AltExplosionTriggerTimer = reader.ReadSingle();
                Explosion = reader.ReadReference(FormKindSet.Any);
                Sound = reader.ReadReference(FormKindSet.Any);
                MuzzleFlashDuration = reader.ReadSingle();
                FadeDuration = reader.ReadSingle();
                ImpactForce = reader.ReadSingle();
                CountdownSound = reader.ReadReference(FormKindSet.Any);
                DisableSound = reader.ReadReference(FormKindSet.Any);
                DefaultWeaponSource = reader.ReadReference(FormKindSet.Any);
                ConeSpread = reader.ReadSingle();
                CollisionRadius = reader.ReadSingle();
                Lifetime = reader.ReadSingle();
                RelaunchInterval = reader.ReadSingle();

                // The following field does not appear is some records
                // Example: FXDustProjectileMed
                if (!reader.IsEndOfSegment)
                    DecalData = reader.ReadReference(FormKindSet.Any);
                else
                    decalDataNotLoaded = true;

                // The following field does not appear in some records
                // Examples: EmptyProjectile, dunMarkarthWizard_SpiderControlProjectileFake
                if (!reader.IsEndOfSegment)
                    CollisionLayer = reader.ReadReference(FormKindSet.Any);
                else
                    collisionLayerNotLoaded = true;
            }
开发者ID:unforbidable,项目名称:patcher,代码行数:39,代码来源:Proj.cs

示例7: ReadField

 internal override void ReadField(RecordReader reader)
 {
     Damage = reader.ReadUInt16();
     Unknown = reader.ReadUInt16();
     Multiplier = reader.ReadSingle();
     Flags = (CriticalFlags)reader.ReadUInt32();
     SpellEffect = reader.ReadReference(FormKindSet.SpelOnly);
 }
开发者ID:unforbidable,项目名称:patcher,代码行数:8,代码来源:Weap.cs

示例8: ReadField

 internal override void ReadField(RecordReader reader)
 {
     Value = reader.ReadInt32();
     Flags = (PotionFlags)reader.ReadUInt32();
     Addiction = reader.ReadReference(FormKindSet.Any);
     AddictionChance = reader.ReadSingle();
     ConsumeSound = reader.ReadReference(FormKindSet.SndrOnly);
 }
开发者ID:unforbidable,项目名称:patcher,代码行数:8,代码来源:Alch.cs


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