本文整理汇总了C#中GenericReader.ReadFloat方法的典型用法代码示例。如果您正苦于以下问题:C# GenericReader.ReadFloat方法的具体用法?C# GenericReader.ReadFloat怎么用?C# GenericReader.ReadFloat使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GenericReader
的用法示例。
在下文中一共展示了GenericReader.ReadFloat方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Deserialize
public override void Deserialize( GenericReader gr )
{
base.Deserialize( gr );
int version = gr.ReadInt();
if ( version > 6 )
{
int nreput = gr.ReadInt();
for(int t = 0;t < nreput;t++ )
{
int krep = gr.ReadInt();
int vrep = gr.ReadInt();
reputationAdjustments[ krep ] = vrep;
}
}
if ( version > 5 )
{
int nact = gr.ReadInt();
for(int t = 0;t < nact;t++ )
actionBar.Add( new Action( gr ) );
}
if ( version > 4 )
{
int nf = gr.ReadInt();
for(int t = 0;t < nf;t++ )
{
UInt64 gu = (UInt64)gr.ReadInt64();
friends.Add( gu );
string user = gr.ReadString();
friends.Add( user );
}
}
if ( version > 2 )
{
BindingPointX = gr.ReadFloat();
BindingPointY = gr.ReadFloat();
BindingPointZ = gr.ReadFloat();
BindingPointMapId = (UInt16)gr.ReadInt();
}
if ( version > 1 )
{
bool pa = gr.ReadBool();
if ( pa )
{
petActions = new int[ 11 ];
for(int t = 0;t < 11;t++ )
petActions[ t ] = gr.ReadInt();
}
}
int sum = gr.ReadInt();
if ( sum != 0 )
{
UInt64 g = gr.ReadInt64();
if ( version > 7 )
{
int sid = gr.ReadInt();
Summon = new BaseCreature( gr );
Summon.Id = sid;
}
// Summon = (Mobile)MobileList.TempSummon[ g ];
Summon.SummonedBy = this;
( Summon as BaseCreature ).AIEngine = new SummonedAI( this, Summon as BaseCreature );
}
sum = gr.ReadInt();
if ( sum != 0 )
{
Charm = (Mobile)MobileList.TempSummon[ gr.ReadInt64() ];
Charm.CharmedBy = this;
( Charm as BaseCreature ).AIEngine = new SummonedAI( this, Charm as BaseCreature );
}
CorpseLocationX = gr.ReadFloat();
CorpseLocationY = gr.ReadFloat();
CorpseLocationZ = gr.ReadFloat();
if ( version > 3 )
CorpseMapId = (ushort)gr.ReadShort();
corpsGuid = gr.ReadInt64();
zones = new uint[ 32 ];
for(int t = 0;t < 32;t++ )
zones[ t ] = (uint)gr.ReadInt();
int exi = gr.ReadInt();
if ( exi == 1 )
{
mark = new Position( gr.ReadFloat(), gr.ReadFloat(), gr.ReadFloat(), gr.ReadInt() );
}
ammoType = gr.ReadInt();
race = (Races)gr.ReadByte();
if ( version == 0 )
Classe = (Classes)gr.ReadByte();
gender = gr.ReadByte();
skin = gr.ReadByte();
face = gr.ReadByte();
hairStyle = gr.ReadByte();
hairColour = gr.ReadByte();
facialHair = gr.ReadByte();
copper = (uint)gr.ReadInt();
int nactq = 20;
for(int t = 0;t < nactq;t++ )
{
int vv = gr.ReadInt();
if ( vv == 1 )
//.........这里部分代码省略.........
示例2: Deserialize
//.........这里部分代码省略.........
else
m_DexReq = -1;
if( GetSaveFlag(flags, SaveFlag.IntReq) )
m_IntReq = reader.ReadInt();
else
m_IntReq = -1;
if( GetSaveFlag(flags, SaveFlag.MinDamage) )
m_MinDamage = reader.ReadInt();
else
m_MinDamage = -1;
if( GetSaveFlag(flags, SaveFlag.MaxDamage) )
m_MaxDamage = reader.ReadInt();
else
m_MaxDamage = -1;
if( GetSaveFlag(flags, SaveFlag.HitSound) )
m_HitSound = reader.ReadInt();
else
m_HitSound = -1;
if( GetSaveFlag(flags, SaveFlag.MissSound) )
m_MissSound = reader.ReadInt();
else
m_MissSound = -1;
if( GetSaveFlag(flags, SaveFlag.Speed) )
{
if( version < 9 )
m_Speed = reader.ReadInt();
else
m_Speed = reader.ReadFloat();
}
else
m_Speed = -1;
if( GetSaveFlag(flags, SaveFlag.MaxRange) )
m_MaxRange = reader.ReadInt();
else
m_MaxRange = -1;
if( GetSaveFlag(flags, SaveFlag.Skill) )
m_Skill = (SkillName)reader.ReadInt();
else
m_Skill = (SkillName)(-1);
if( GetSaveFlag(flags, SaveFlag.Type) )
m_Type = (WeaponType)reader.ReadInt();
else
m_Type = (WeaponType)(-1);
if( GetSaveFlag(flags, SaveFlag.Animation) )
m_Animation = (WeaponAnimation)reader.ReadInt();
else
m_Animation = (WeaponAnimation)(-1);
if( GetSaveFlag(flags, SaveFlag.Resource) )
m_Resource = (CraftResource)reader.ReadInt();
else
m_Resource = CraftResource.Iron;
if( GetSaveFlag(flags, SaveFlag.xAttributes) )
m_AosAttributes = new AosAttributes(this, reader);
else
示例3: Deserialize
//.........这里部分代码省略.........
m_MaxDamage = reader.ReadInt();
}
else
{
m_MaxDamage = -1;
}
if (GetSaveFlag(flags, SaveFlag.HitSound))
{
m_HitSound = reader.ReadInt();
}
else
{
m_HitSound = -1;
}
if (GetSaveFlag(flags, SaveFlag.MissSound))
{
m_MissSound = reader.ReadInt();
}
else
{
m_MissSound = -1;
}
if (GetSaveFlag(flags, SaveFlag.Speed))
{
if (version < 9)
{
m_Speed = reader.ReadInt();
}
else
{
m_Speed = reader.ReadFloat();
}
}
else
{
m_Speed = -1;
}
if (GetSaveFlag(flags, SaveFlag.MaxRange))
{
m_MaxRange = reader.ReadInt();
}
else
{
m_MaxRange = -1;
}
if (GetSaveFlag(flags, SaveFlag.Skill))
{
m_Skill = (SkillName)reader.ReadInt();
}
else
{
m_Skill = (SkillName)(-1);
}
if (GetSaveFlag(flags, SaveFlag.Type))
{
m_Type = (WeaponType)reader.ReadInt();
}
else
{
m_Type = (WeaponType)(-1);
示例4: Deserialize
public virtual void Deserialize( GenericReader gr )
{
int version = gr.ReadInt();
guid = gr.ReadInt64();
X = gr.ReadFloat();
Y = gr.ReadFloat();
Z = gr.ReadFloat();
Orientation = gr.ReadFloat();
MapId = (UInt16)gr.ReadShort();
ZoneId = (int)gr.ReadInt();
/* int dec = gr.ReadInt();
if ( dec == 1 )
decay = DateTime.Now;*/
}
示例5: Deserialize
//.........这里部分代码省略.........
else
m_DexReq = -1;
if ( GetSaveFlag( flags, SaveFlag.IntReq ) )
m_IntReq = reader.ReadInt();
else
m_IntReq = -1;
if ( GetSaveFlag( flags, SaveFlag.MinDamage ) )
m_MinDamage = reader.ReadInt();
else
m_MinDamage = -1;
if ( GetSaveFlag( flags, SaveFlag.MaxDamage ) )
m_MaxDamage = reader.ReadInt();
else
m_MaxDamage = -1;
if ( GetSaveFlag( flags, SaveFlag.HitSound ) )
m_HitSound = reader.ReadInt();
else
m_HitSound = -1;
if ( GetSaveFlag( flags, SaveFlag.MissSound ) )
m_MissSound = reader.ReadInt();
else
m_MissSound = -1;
if ( GetSaveFlag( flags, SaveFlag.Speed ) )
{
if ( version < 9 )
m_Speed = reader.ReadInt();
else
m_Speed = reader.ReadFloat();
}
else
m_Speed = -1;
if ( GetSaveFlag( flags, SaveFlag.MaxRange ) )
m_MaxRange = reader.ReadInt();
else
m_MaxRange = -1;
if ( GetSaveFlag( flags, SaveFlag.Skill ) )
m_Skill = (SkillName)reader.ReadInt();
else
m_Skill = (SkillName)(-1);
if ( GetSaveFlag( flags, SaveFlag.Type ) )
m_Type = (WeaponType)reader.ReadInt();
else
m_Type = (WeaponType)(-1);
if ( GetSaveFlag( flags, SaveFlag.Animation ) )
m_Animation = (WeaponAnimation)reader.ReadInt();
else
m_Animation = (WeaponAnimation)(-1);
if ( GetSaveFlag( flags, SaveFlag.Resource ) )
m_Resource = (CraftResource)reader.ReadInt();
else
m_Resource = CraftResource.Iron;
if ( UseSkillMod && m_AccuracyLevel != WeaponAccuracyLevel.Regular && Parent is Mobile )
{
m_SkillMod = new DefaultSkillMod( AccuracySkill, true, (int)m_AccuracyLevel * 5 );
示例6: Deserialize
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
switch (version)
{
case 1:
{
f_SkillValue = reader.ReadFloat();
m_NewPlayer = reader.ReadMobile();
break;
}
}
}
示例7: Deserialize
//.........这里部分代码省略.........
m_DamageMax = reader.ReadInt();
}
else
{
m_DamageMax = -1;
}
if (GetSaveFlag(flags, SaveFlag.HitSound))
{
m_HitSound = reader.ReadInt();
}
else
{
m_HitSound = -1;
}
if (GetSaveFlag(flags, SaveFlag.MissSound))
{
m_MissSound = reader.ReadInt();
}
else
{
m_MissSound = -1;
}
if (GetSaveFlag(flags, SaveFlag.Speed))
{
if (version < 9)
{
m_Speed = reader.ReadInt();
}
else
{
m_Speed = reader.ReadFloat();
}
}
else
{
m_Speed = -1;
}
if (GetSaveFlag(flags, SaveFlag.MaxRange))
{
m_MaxRange = reader.ReadInt();
}
else
{
m_MaxRange = -1;
}
if (GetSaveFlag(flags, SaveFlag.Skill))
{
m_Skill = (SkillName) reader.ReadInt();
}
else
{
m_Skill = (SkillName) (-1);
}
if (GetSaveFlag(flags, SaveFlag.Type))
{
m_Type = (WeaponType) reader.ReadInt();
}
else
{
m_Type = (WeaponType) (-1);
示例8: Deserialize
public override void Deserialize( GenericReader gr )
{
int version = gr.ReadInt();
// id = gr.ReadInt();
UInt64 g = gr.ReadInt64();
SpawnerLink = null;//(BaseSpawner)MobileList.TempSpawner[ g ];
int esu = 0;
int ech = 0;
esu = gr.ReadInt();
ech = gr.ReadInt();
name = gr.ReadString();
if ( version > 0 )
classe = (Classes)gr.ReadInt();
talent = gr.ReadInt();
Level = gr.ReadInt();
model = gr.ReadInt();
exp = (uint)gr.ReadInt();
guildId = (uint)gr.ReadInt();
petLevel = (uint)gr.ReadInt();
petCreatureFamily = (uint)gr.ReadInt();
petDisplayId = (uint)gr.ReadInt();
speed = gr.ReadFloat();
size = gr.ReadFloat();
faction = (Factions)gr.ReadInt();
str = gr.ReadInt();
agility = gr.ReadInt();
stamina = gr.ReadInt();
iq = gr.ReadInt();
spirit = gr.ReadInt();
baseStr = gr.ReadFloat();
baseAgility = gr.ReadFloat();
baseStamina = gr.ReadFloat();
baseIq = gr.ReadFloat();
baseSpirit = gr.ReadFloat();
walkSpeed = gr.ReadFloat();
if ( walkSpeed == 0 )
walkSpeed = 4.7777f;
runSpeed = gr.ReadFloat();
if ( runSpeed == 0 )
runSpeed = 7f;
swimSpeed = gr.ReadFloat();
if ( swimSpeed == 0 )
swimSpeed = 4.72f;
swimBackSpeed = gr.ReadFloat();
if ( swimBackSpeed == 0 )
swimBackSpeed = 2.5f;
hitPoints = gr.ReadInt();
mana = gr.ReadInt();
energy = gr.ReadInt();
rage = gr.ReadInt();
focus = gr.ReadInt();
baseHitPoints = gr.ReadInt();
baseMana = gr.ReadInt();
baseEnergy = gr.ReadInt();
baseRage = gr.ReadInt();
baseFocus = gr.ReadInt();
block = gr.ReadInt();
armor = gr.ReadInt();
resistHoly = gr.ReadInt();
resistFire = gr.ReadInt();
resistNature = gr.ReadInt();
resistFrost = gr.ReadInt();
resistShadow = gr.ReadInt();
resistArcane = gr.ReadInt();
int nSkills = gr.ReadInt();
for(int t = 0;t < nSkills;t++ )
{
ushort skill = (ushort)gr.ReadShort();
allSkills[ skill ] = Skill.Deserialize( gr, t );
}
int nSpells = gr.ReadInt();
for(int t = 0;t < nSpells;t++ )
{
ushort spell = (ushort)gr.ReadShort();
byte place = gr.ReadByte();
knownAbilities[ (int)spell ] = (int)place;
/* if ( TalentDescription.IsTalent( (int)spell ) )
{
if ( onInitialiseTalent[ (int)spell ] != null )
{
( onInitialiseTalent[ (int)spell ] as TalentHandlers.TalentHandler )( Abilities.abilities[ (int)spell ], this );
}
// this.AddPermanentAura( Abilities.abilities[ (int)spell ], new Aura() );
// permanentAura.Add( spell );
}*/
}
int nTalentList = gr.ReadInt();
for(int t = 0;t < nTalentList;t++ )
{
int spell = gr.ReadInt();
int lev = gr.ReadInt();
talentList[ spell ] = (int)lev;
}
//.........这里部分代码省略.........
示例9: Deserialize
public override void Deserialize( GenericReader gr )
{
base.Deserialize( gr );
int version = gr.ReadInt();
defaultModel = gr.ReadInt();
rotationX = gr.ReadFloat();
rotationY = gr.ReadFloat();
rotationZ = gr.ReadFloat();
facing = gr.ReadFloat();
int pres = gr.ReadInt();
if ( pres == 1 )
{
gameObjectHandler = gr.ReadString();
}
}
示例10: Deserialize
public virtual void Deserialize( GenericReader gr )
{
int version = gr.ReadInt();
int n = gr.ReadInt();
guid = (UInt64)gr.ReadInt64();
longueur = 0;
//Coord last = null;
for(int t = 0;t < n;t++)
{
byte typ = gr.ReadByte();
if ( typ == 0 )
{
float x = gr.ReadFloat();
float y = gr.ReadFloat();
float z = gr.ReadFloat();
int p1 = gr.ReadInt();
int p2 = gr.ReadInt();
int n1 = gr.ReadInt();
int n2 = gr.ReadInt();
Coord nc = new Coord( x, y, z, null, null );
allLinks.Add( nc );
allLinks.Add( p1 );
allLinks.Add( p2 );
allLinks.Add( n1 );
allLinks.Add( n2 );
Add( nc );
}
else
{
float x = gr.ReadFloat();
float y = gr.ReadFloat();
float z = gr.ReadFloat();
int p1 = gr.ReadInt();
int p2 = gr.ReadInt();
int n1 = gr.ReadInt();
int n2 = gr.ReadInt();
Intersection ii = new Intersection( null, null, null, null, x, y, z );
allLinks.Add( ii );
allLinks.Add( p1 );
allLinks.Add( p2 );
allLinks.Add( n1 );
allLinks.Add( n2 );
p1 = gr.ReadInt();
p2 = gr.ReadInt();
n1 = gr.ReadInt();
n2 = gr.ReadInt();
allLinks.Add( p1 );
allLinks.Add( p2 );
allLinks.Add( n1 );
allLinks.Add( n2 );
Add( ii );
}
}
}