當前位置: 首頁>>代碼示例>>C#>>正文


C# GraphSerializationContext.SerializeVector3方法代碼示例

本文整理匯總了C#中Pathfinding.Serialization.GraphSerializationContext.SerializeVector3方法的典型用法代碼示例。如果您正苦於以下問題:C# GraphSerializationContext.SerializeVector3方法的具體用法?C# GraphSerializationContext.SerializeVector3怎麽用?C# GraphSerializationContext.SerializeVector3使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Pathfinding.Serialization.GraphSerializationContext的用法示例。


在下文中一共展示了GraphSerializationContext.SerializeVector3方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: SerializeSettings

		public override void SerializeSettings ( GraphSerializationContext ctx ) {

			base.SerializeSettings (ctx);
			ctx.writer.Write (characterRadius);
			ctx.writer.Write (contourMaxError);
			ctx.writer.Write (cellSize);
			ctx.writer.Write (cellHeight);
			ctx.writer.Write (walkableHeight);
			ctx.writer.Write (maxSlope);
			ctx.writer.Write (maxEdgeLength);
			ctx.writer.Write (editorTileSize);
			ctx.writer.Write (tileSizeX);
			ctx.writer.Write (nearestSearchOnlyXZ);
			ctx.writer.Write (useTiles);
			ctx.writer.Write ((int)relevantGraphSurfaceMode);
			ctx.writer.Write (rasterizeColliders);
			ctx.writer.Write (rasterizeMeshes);
			ctx.writer.Write (rasterizeTerrain);
			ctx.writer.Write (rasterizeTrees);
			ctx.writer.Write (colliderRasterizeDetail);
			ctx.SerializeVector3 (forcedBoundsCenter);
			ctx.SerializeVector3 (forcedBoundsSize);
			ctx.writer.Write (mask);
			ctx.writer.Write (tagMask.Count);
			for (int i = 0; i < tagMask.Count; i++) {
				ctx.writer.Write (tagMask[i]);
			}
			ctx.writer.Write (showMeshOutline);
			ctx.writer.Write (showNodeConnections);
			ctx.writer.Write (terrainSampleSize);

			ctx.writer.Write (walkableClimb);
			ctx.writer.Write (minRegionSize);
			ctx.writer.Write (tileSizeZ);
		}
開發者ID:mBeierl,項目名稱:GGJ16,代碼行數:35,代碼來源:RecastGenerator.cs

示例2: SerializeSettings

		public override void SerializeSettings (GraphSerializationContext ctx) {
			base.SerializeSettings(ctx);
			ctx.writer.Write(aspectRatio);
			ctx.SerializeVector3(rotation);
			ctx.SerializeVector3(center);
			ctx.SerializeVector3((Vector3)unclampedSize);
			ctx.writer.Write(nodeSize);
			// collision
			collision.SerializeSettings(ctx);

			ctx.writer.Write(maxClimb);
			ctx.writer.Write(maxClimbAxis);
			ctx.writer.Write(maxSlope);
			ctx.writer.Write(erodeIterations);
			ctx.writer.Write(erosionUseTags);
			ctx.writer.Write(erosionFirstTag);
			ctx.writer.Write(autoLinkGrids);
			ctx.writer.Write((int)neighbours);
			ctx.writer.Write(cutCorners);
			ctx.writer.Write(penaltyPosition);
			ctx.writer.Write(penaltyPositionFactor);
			ctx.writer.Write(penaltyAngle);
			ctx.writer.Write(penaltyAngleFactor);
			ctx.writer.Write(penaltyAnglePower);
			ctx.writer.Write(isometricAngle);
			ctx.writer.Write(uniformEdgeCosts);
		}
開發者ID:Xylord,項目名稱:Project-Feels,代碼行數:27,代碼來源:GridGenerator.cs

示例3: SerializeSettings

		public override void SerializeSettings ( GraphSerializationContext ctx ) {
			base.SerializeSettings (ctx);

			ctx.SerializeUnityObject ( sourceMesh );

			ctx.SerializeVector3 (offset);
			ctx.SerializeVector3 (rotation);

			ctx.writer.Write(scale);
			ctx.writer.Write(accurateNearestNode);
		}
開發者ID:Marchys,項目名稱:fanalet,代碼行數:11,代碼來源:NavMeshGenerator.cs


注:本文中的Pathfinding.Serialization.GraphSerializationContext.SerializeVector3方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。