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


C# IValueReader.ReadBool方法代码示例

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


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

示例1: ReadPayload

		public override void ReadPayload (ISerializationContext context, IValueReader reader)
		{
			if (reader.ReadBool())
				SenderId = reader.ReadString();

			GroupId = reader.ReadInt32();
			Text = reader.ReadString();
		}
开发者ID:ermau,项目名称:Tempest.Social,代码行数:8,代码来源:TextMessage.cs

示例2: Deserialize

        public void Deserialize(IValueReader reader)
        {
            this.NonCharacter = reader.ReadBool();
            this.PlayerID = reader.ReadInt32 ();

            int count = reader.ReadInt32 ();
            for(int i = 0; i < count; i++)
                this.path.Add ((Directions) reader.ReadInt32 ());
        }
开发者ID:heyitsanewb,项目名称:PokeWorld-Online,代码行数:9,代码来源:ApplyMovementCommand.cs

示例3: BodyInfo

 /// <summary>
 /// Initializes a new instance of the <see cref="BodyInfo"/> class.
 /// </summary>
 /// <param name="reader">The <see cref="IValueReader"/> to read the values from.</param>
 public BodyInfo(IValueReader reader)
 {
     ID = reader.ReadBodyID(_idValueKey);
     Body = reader.ReadString(_bodyValueKey);
     Fall = reader.ReadString(_fallValueKey);
     Jump = reader.ReadString(_jumpValueKey);
     Attack = reader.ReadString(_attackValueKey);
     Stand = reader.ReadString(_standValueKey);
     Walk = reader.ReadString(_walkValueKey);
     Size = reader.ReadVector2(_sizeValueKey);
     Paperdoll = reader.ReadBool(_paperdollValueKey);
 }
开发者ID:mateuscezar,项目名称:netgore,代码行数:16,代码来源:BodyInfo.cs

示例4: Read

        /// <summary>
        /// Reads the values for this <see cref="NPCChatConditionalCollectionItemBase"/> from an <see cref="IValueReader"/>.
        /// </summary>
        /// <param name="reader"><see cref="IValueReader"/> to read the values from.</param>
        /// <exception cref="ArgumentException">The read <see cref="NPCChatConditionalBase"/> was invalid.</exception>
        protected void Read(IValueReader reader)
        {
            var not = reader.ReadBool("Not");
            var conditionalName = reader.ReadString("ConditionalName");
            var parameters = reader.ReadManyNodes("Parameters", NPCChatConditionalParameter.Read);

            var conditional = NPCChatConditionalBase.GetConditional(conditionalName);
            if (conditional == null)
            {
                const string errmsg = "Failed to get conditional `{0}`.";
                throw new ArgumentException(string.Format(errmsg, conditionalName), "reader");
            }

            SetReadValues(conditional, not, parameters);
        }
开发者ID:wtfcolt,项目名称:game,代码行数:20,代码来源:NPCChatConditionalCollectionItemBase.cs

示例5: ReadPayload

        public override void ReadPayload(ISerializationContext context, IValueReader reader)
        {
            if (reader.ReadBool())
            {
                string[] algs = new string[reader.ReadInt32()];
                for (int i = 0; i < algs.Length; ++i)
                    algs[i] = reader.ReadString();

                SignatureHashAlgorithms = algs;
            }

            Protocol[] protocols = new Protocol[reader.ReadInt32()];
            for (int i = 0; i < protocols.Length; ++i)
                protocols[i] = new Protocol (context, reader);

            Protocols = protocols;
        }
开发者ID:ermau,项目名称:Tempest,代码行数:17,代码来源:ConnectMessage.cs

示例6: ReadPayload

 public override void ReadPayload(ISerializationContext context, IValueReader reader)
 {
     this.IsActive = reader.ReadBool();
 }
开发者ID:HaKDMoDz,项目名称:Alloy,代码行数:4,代码来源:MachineStateMessage.cs

示例7: ReadCustomValues

 /// <summary>
 /// When overridden in the derived class, reads all custom state values from the <paramref name="reader"/>.
 /// </summary>
 /// <param name="reader">The <see cref="IValueReader"/> to read the state values from.</param>
 protected override void ReadCustomValues(IValueReader reader)
 {
     Closed = reader.ReadBool(_closedKeyName);
     Scale = reader.ReadFloat(_scaleKeyName);
     Rotation = reader.ReadFloat(_rotationKeyName);
     PolygonOrigin = reader.ReadEnum<PolygonOrigin>(_polygonOriginKeyName);
     Points.Read(_pointsNodeName, reader);
 }
开发者ID:wtfcolt,项目名称:game,代码行数:12,代码来源:PolygonEmitter.cs

示例8: ReadState

 /// <summary>
 /// Reads the state of the object from an <see cref="IValueReader"/>. Values should be read in the exact
 /// same order as they were written.
 /// </summary>
 /// <param name="reader">The <see cref="IValueReader"/> to read the values from.</param>
 public virtual void ReadState(IValueReader reader)
 {
     Multiline = reader.ReadBool(_multilineValueKey);
     Text = reader.ReadString(_textValueKey);
     PersistableHelper.Read(this, reader);
 }
开发者ID:mateuscezar,项目名称:netgore,代码行数:11,代码来源:PersistableTextBox.cs

示例9: ReadState

        /// <summary>
        /// Reads the state of the object from an <see cref="IValueReader"/>. Values should be read in the exact
        /// same order as they were written.
        /// </summary>
        /// <param name="reader">The <see cref="IValueReader"/> to read the values from.</param>
        public void ReadState(IValueReader reader)
        {
            PositionProvider = null;
            Tag = null;

            Position = reader.ReadVector2(_positionValueKey);
            Size = reader.ReadVector2(_sizeValueKey);
            Color = reader.ReadColor(_colorValueKey);
            Rotation = reader.ReadFloat(_rotationValueKey);
            IsEnabled = reader.ReadBool(_isEnabledValueKey);

            var grhIndex = reader.ReadGrhIndex(_spriteValueKey);
            if (!grhIndex.IsInvalid)
                Sprite = new Grh(grhIndex, AnimType.Loop, 0);
            else
                Sprite = null;
        }
开发者ID:mateuscezar,项目名称:netgore,代码行数:22,代码来源:Light.cs

示例10: Read

        /// <summary>
        /// Reads the SkeletonNode's values from an IValueReader.
        /// </summary>
        /// <param name="reader">IValueReader to read the values from.</param>
        /// <returns>The name of the parent SkeletonNode, or null if the SkeletonNode has no parent (root node).
        /// The SkeletonNode's parent must be set manually using this value.</returns>
        public string Read(IValueReader reader)
        {
            Name = reader.ReadString(_nameValueKey);
            Position = reader.ReadVector2(_positionValueKey);
            IsModifier = reader.ReadBool(_isModifierValueKey);
            var hasParent = reader.ReadBool(_hasParentValueKey);

            string parentName = null;
            if (hasParent)
                parentName = reader.ReadString(_parentNameValueKey);

            return parentName;
        }
开发者ID:mateuscezar,项目名称:netgore,代码行数:19,代码来源:SkeletonNode.cs

示例11: Deserialize

 public void Deserialize(ISerializationContext context, IValueReader reader)
 {
     UserId = reader.ReadInt32();
     Username = reader.ReadString();
     CurrentChannelId = reader.ReadInt32();
     Nickname = reader.ReadString();
     Phonetic = reader.ReadString();
     IsMuted = reader.ReadBool();
     Status = (UserStatus)reader.ReadByte();
     Comment = reader.ReadString();
 }
开发者ID:ermau,项目名称:Gablarski,代码行数:11,代码来源:UserInfo.cs

示例12: ReadPayload

 public override void ReadPayload(ISerializationContext context, IValueReader reader)
 {
     Removing = reader.ReadBool();
     BanInfo = new BanInfo (context, reader);
 }
开发者ID:ermau,项目名称:Gablarski,代码行数:5,代码来源:BanUserMessage.cs

示例13: ReadCustomValues

        /// <summary>
        /// Reads the <see cref="ParticleModifier"/>'s custom values from the <see cref="reader"/>.
        /// </summary>
        /// <param name="reader"><see cref="IValueReader"/> to read the custom values from.</param>
        protected override void ReadCustomValues(IValueReader reader)
        {
            ModifyRed = reader.ReadBool(_modifyRedKeyName);
            ModifyGreen = reader.ReadBool(_modifyGreenKeyName);
            ModifyBlue = reader.ReadBool(_modifyBlueKeyName);
            ModifyAlpha = reader.ReadBool(_modifyAlphaKeyName);

            ReleaseColor = reader.ReadColor(_releaseColorKeyName);
            UltimateColor = reader.ReadColor(_ultimateColorKeyName);
        }
开发者ID:wtfcolt,项目名称:game,代码行数:14,代码来源:ParticleColorModifier.cs

示例14: Deserialize

        public void Deserialize(ISerializationContext context, IValueReader reader)
        {
            Name = reader.ReadString();
            Description = reader.ReadString();
            Logo = reader.ReadString();
            Passworded = reader.ReadBool();
            RegistrationMode = (UserRegistrationMode)reader.ReadByte();

            if (RegistrationMode != UserRegistrationMode.None)
                RegistrationContent = reader.ReadString();
        }
开发者ID:ermau,项目名称:Gablarski,代码行数:11,代码来源:ServerInfo.cs

示例15: Read

        void Read(IValueReader r)
        {
            var position = r.ReadVector2(_positionValueKey);
            var size = r.ReadVector2(_sizeValueKey);
            IsPlatform = r.ReadBool(_isPlatformValueKey);
            BoundGrhIndex = r.ReadGrhIndex(_boundGrhIndexValueKey);

            SetPositionRaw(position);
            SetSizeRaw(size);
        }
开发者ID:wtfcolt,项目名称:game,代码行数:10,代码来源:WallEntityBase.cs


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