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


C# IValueWriter.WriteManyNodes方法代码示例

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


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

示例1: Write

        /// <summary>
        /// Writes the <see cref="Skeleton"/> to an <see cref="IValueWriter"/>.
        /// </summary>
        /// <param name="writer">The <see cref="IValueWriter"/> to write to.</param>
        /// <exception cref="ArgumentNullException"><paramref name="writer" /> is <c>null</c>.</exception>
        public void Write(IValueWriter writer)
        {
            if (writer == null)
                throw new ArgumentNullException("writer");

            writer.WriteManyNodes(_nodesNodeName, RootNode.GetAllNodes(), ((w, item) => item.Write(w)));
        }
开发者ID:wtfcolt,项目名称:game,代码行数:12,代码来源:Skeleton.cs

示例2: SaveRefractionEffects

 void SaveRefractionEffects(IValueWriter w)
 {
     w.WriteStartNode(_refractionEffectsNodeName);
     {
         var validFx = _refractionEffects.Where(x => RefractionEffectFactory.IsValidType(x.GetType())).ToImmutable();
         w.WriteManyNodes(_refractionEffectListNodeName, validFx, RefractionEffectFactory.Write);
     }
     w.WriteEndNode(_refractionEffectsNodeName);
 }
开发者ID:mateuscezar,项目名称:netgore,代码行数:9,代码来源:Map.cs

示例3: Write

 public void Write(IValueWriter writer)
 {
     writer.WriteManyNodes(_itemsNodeName, Items, ((w, item) => item.Write(w)));
 }
开发者ID:mateuscezar,项目名称:netgore,代码行数:4,代码来源:SkeletonBodyInfo.cs

示例4: SaveGrhs

        /// <summary>
        /// Writes all the MapGrhs to an <see cref="IValueWriter"/>.
        /// </summary>
        /// <param name="w">IValueWriter to write to.</param>
        void SaveGrhs(IValueWriter w)
        {
            w.WriteStartNode(_mapGrhsNodeName);
            {
                // Used GrhIndexes
                w.WriteMany(_usedIndiciesNodeName, GetMapGrhList(), w.Write);

                // MapGrhs
                w.WriteManyNodes(_mapGrhsNodeName, Spatial.GetMany<MapGrh>().Distinct(),
                    ((writer, item) => item.WriteState(writer)));
            }
            w.WriteEndNode(_mapGrhsNodeName);
        }
开发者ID:mateuscezar,项目名称:netgore,代码行数:17,代码来源:Map.cs

示例5: SaveLighting

 void SaveLighting(IValueWriter w)
 {
     w.WriteStartNode(_lightingNodeName);
     {
         w.Write("Ambient", AmbientLight);
         w.WriteManyNodes(_lightsNodeName, _lights.ToArray(), (wr, l) => l.WriteState(wr));
     }
     w.WriteEndNode(_lightingNodeName);
 }
开发者ID:mateuscezar,项目名称:netgore,代码行数:9,代码来源:Map.cs

示例6: Write

 public void Write(IValueWriter writer)
 {
     writer.WriteManyNodes(_framesNodeName, KeyFrames, ((w, item) => item.Write(w)));
 }
开发者ID:mateuscezar,项目名称:netgore,代码行数:4,代码来源:SkeletonSet.cs

示例7: SaveBackgroundImages

 /// <summary>
 /// Writes all the BackgroundImages.
 /// </summary>
 /// <param name="w">IValueWriter to write to..</param>
 void SaveBackgroundImages(IValueWriter w)
 {
     var bgImagesToWrite = _backgroundImages.Where(x => x != null);
     w.WriteManyNodes(_bgImagesNodeName, bgImagesToWrite, ((writer, item) => item.Write(writer)));
 }
开发者ID:mateuscezar,项目名称:netgore,代码行数:9,代码来源:Map.cs

示例8: Write

        /// <summary>
        /// Writes the NPCChatDialogItemBase's values to an IValueWriter.
        /// </summary>
        /// <param name="writer">IValueWriter to write the values to.</param>
        public void Write(IValueWriter writer)
        {
            AssertBranchHasTwoResponses();
            AssertNonBranchHasNoConditionals();
            AssertResponsesHaveValidValues();

            writer.Write("ID", ID);
            writer.Write("Title", Title ?? string.Empty);
            writer.Write("Text", Text ?? string.Empty);
            writer.Write("IsBranch", IsBranch);
            writer.WriteManyNodes("Responses", Responses, ((w, item) => item.Write(w)));

            if (IsBranch)
            {
                writer.WriteStartNode("Conditionals");
                {
                    var c = Conditionals;
                    var hasConditionals = (c != null) && (c.Count() > 0);
                    writer.Write("HasConditionals", hasConditionals);
                    if (hasConditionals)
                        c.Write(writer);
                }
                writer.WriteEndNode("Conditionals");
            }
        }
开发者ID:mateuscezar,项目名称:netgore,代码行数:29,代码来源:NPCChatDialogItemBase.cs

示例9: WriteWalls

        static void WriteWalls(IValueWriter w, KeyValuePair<GrhIndex, List<WallEntityBase>> item)
        {
            var grhIndex = item.Key;
            var walls = item.Value;

            w.Write(_grhIndexValueKey, grhIndex);
            w.WriteManyNodes(_wallsNodeName, walls, ((pwriter, pitem) => pitem.Write(pwriter)));
        }
开发者ID:Vizzini,项目名称:netgore,代码行数:8,代码来源:MapGrhWalls.cs

示例10: Write

 /// <summary>
 /// Writes the NPCChatConditionalCollectionItemBase's values to an IValueWriter.
 /// </summary>
 /// <param name="writer">IValueWriter to write the values to.</param>
 public void Write(IValueWriter writer)
 {
     writer.Write("Not", Not);
     writer.Write("ConditionalName", Conditional.Name);
     writer.WriteManyNodes("Parameters", Parameters, ((w, item) => item.Write(w)));
 }
开发者ID:wtfcolt,项目名称:game,代码行数:10,代码来源:NPCChatConditionalCollectionItemBase.cs

示例11: WriteState

        /// <summary>
        /// Writes the state of the object to an <see cref="IValueWriter"/>.
        /// </summary>
        /// <param name="writer">The <see cref="IValueWriter"/> to write the values to.</param>
        public override void WriteState(IValueWriter writer)
        {
            base.WriteState(writer);

            CreateSlots();

            writer.WriteManyNodes("QuickBarItems", _slots.Select(x => new QuickBarSlotValues(x)).ToArray(), (w, x) => x.Write(w));
        }
开发者ID:mateuscezar,项目名称:netgore,代码行数:12,代码来源:QuickBarForm.cs

示例12: WriteState

        /// <summary>
        /// Writes the state of the object to an <see cref="IValueWriter"/>.
        /// </summary>
        /// <param name="writer">The <see cref="IValueWriter"/> to write the values to.</param>
        public void WriteState(IValueWriter writer)
        {
            writer.WriteStartNode(_particleEffectNodeName);
            {
                // Write the effect properties
                PersistableHelper.Write(this, writer);

                // Write the emitters
                writer.WriteManyNodes(_emittersNodeName, _emitters, ParticleEmitterFactory.Write);
            }
            writer.WriteEndNode(_particleEffectNodeName);
        }
开发者ID:wtfcolt,项目名称:game,代码行数:16,代码来源:ParticleEffect.cs

示例13: Write

 /// <summary>
 /// Writes the <see cref="TableSchema"/> the specified writer.
 /// </summary>
 /// <param name="writer">The <see cref="IValueWriter"/> to write to.</param>
 public void Write(IValueWriter writer)
 {
     writer.Write(_tableNameValueKey, _tableName);
     writer.WriteManyNodes(_columnsNodeName, _columns.ToArray(), (w, x) => x.Write(w));
 }
开发者ID:mateuscezar,项目名称:netgore,代码行数:9,代码来源:TableSchema.cs

示例14: Write

 /// <summary>
 /// Writes the <see cref="BodyInfoManager"/> data to an <see cref="IValueWriter"/>.
 /// </summary>
 /// <param name="writer">The <see cref="IValueWriter"/> to write the <see cref="BodyInfoManager"/> data to.</param>
 public void Write(IValueWriter writer)
 {
     writer.WriteManyNodes(_bodyNodeName, _bodies.Values, (w, body) => body.Write(w));
 }
开发者ID:mateuscezar,项目名称:netgore,代码行数:8,代码来源:BodyInfoManager.cs

示例15: Write

 /// <summary>
 /// Writes the <see cref="ColumnSchema"/>.
 /// </summary>
 /// <param name="writer">The <see cref="IValueWriter"/> to write to.</param>
 public void Write(IValueWriter writer)
 {
     var v = _values.OrderBy(x => x.Key).ToArray();
     writer.WriteManyNodes(_valuesNodeName, v, WriteKVP);
 }
开发者ID:mateuscezar,项目名称:netgore,代码行数:9,代码来源:ColumnSchema.cs


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