本文整理汇总了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));
}
}
示例2: ReadField
internal override void ReadField(RecordReader reader)
{
Sound = reader.ReadReference(FormKindSet.SndrOnly);
Type = (WeatherSoundType)reader.ReadInt32();
}
示例3: ReadField
internal override void ReadField(RecordReader reader)
{
Projectile = reader.ReadReference(FormKindSet.ProjOnly);
Flags = (AmmoFlags)reader.ReadUInt32();
Damage = reader.ReadSingle();
Value = reader.ReadInt32();
}
示例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();
}
示例5: ReadField
internal override void ReadField(RecordReader reader)
{
Item = reader.ReadReference(FormKindSet.Any);
Quantity = reader.ReadUInt32();
}
示例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;
}
示例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);
}
示例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);
}