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


C# GenericReader.ReadFloat方法代码示例

本文整理汇总了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 )
//.........这里部分代码省略.........
开发者ID:karliky,项目名称:wowwow,代码行数:101,代码来源:Character.cs

示例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
开发者ID:greeduomacro,项目名称:hubroot,代码行数:67,代码来源:BaseWeapon.cs

示例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);
开发者ID:Tukaramdas,项目名称:ServUO-EC-Test-Fork,代码行数:67,代码来源:BaseWeapon.cs

示例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;*/
 }
开发者ID:karliky,项目名称:wowwow,代码行数:14,代码来源:Object.cs

示例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 );
开发者ID:Grimoric,项目名称:RunUO.T2A,代码行数:67,代码来源:BaseWeapon.cs

示例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;
                    }
            }
        }
开发者ID:kamronbatman,项目名称:Defiance-AOS-Pre-2012,代码行数:15,代码来源:SkillBalls.cs

示例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);
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:67,代码来源:BaseWeapon.cs

示例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;
			}
			
//.........这里部分代码省略.........
开发者ID:karliky,项目名称:wowwow,代码行数:101,代码来源:Mobile.cs

示例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();
     }
 }
开发者ID:karliky,项目名称:wowwow,代码行数:15,代码来源:GameObjectSpawner.cs

示例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 );
         }
     }
 }
开发者ID:karliky,项目名称:wowwow,代码行数:54,代码来源:Trajet.cs


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