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


C# GraphSerializationContext.DeserializeVector3方法代码示例

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


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

示例1: DeserializeSettings

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

			aspectRatio = ctx.reader.ReadSingle();
			rotation = ctx.DeserializeVector3();
			center = ctx.DeserializeVector3();
			unclampedSize = (Vector2)ctx.DeserializeVector3();
			nodeSize = ctx.reader.ReadSingle();
			collision.DeserializeSettings(ctx);
			maxClimb = ctx.reader.ReadSingle();
			maxClimbAxis = ctx.reader.ReadInt32();
			maxSlope = ctx.reader.ReadSingle();
			erodeIterations = ctx.reader.ReadInt32();
			erosionUseTags = ctx.reader.ReadBoolean();
			erosionFirstTag = ctx.reader.ReadInt32();
			autoLinkGrids = ctx.reader.ReadBoolean();
			neighbours = (NumNeighbours)ctx.reader.ReadInt32();
			cutCorners = ctx.reader.ReadBoolean();
			penaltyPosition = ctx.reader.ReadBoolean();
			penaltyPositionFactor = ctx.reader.ReadSingle();
			penaltyAngle = ctx.reader.ReadBoolean();
			penaltyAngleFactor = ctx.reader.ReadSingle();
			penaltyAnglePower = ctx.reader.ReadSingle();
			isometricAngle = ctx.reader.ReadSingle();
			uniformEdgeCosts = ctx.reader.ReadBoolean();
		}
开发者ID:Xylord,项目名称:Project-Feels,代码行数:26,代码来源:GridGenerator.cs

示例2: DeserializeSettings

		public override void DeserializeSettings ( GraphSerializationContext ctx ) {

			base.DeserializeSettings (ctx);
			
			sourceMesh = ctx.DeserializeUnityObject () as Mesh;

			offset = ctx.DeserializeVector3 ();
			rotation = ctx.DeserializeVector3 ();
			scale = ctx.reader.ReadSingle();
			accurateNearestNode = ctx.reader.ReadBoolean();
		}
开发者ID:Marchys,项目名称:fanalet,代码行数:11,代码来源:NavMeshGenerator.cs

示例3: DeserializeSettings

		public override void DeserializeSettings ( GraphSerializationContext ctx ) {

			base.DeserializeSettings (ctx);

			characterRadius = ctx.reader.ReadSingle ();
			contourMaxError = ctx.reader.ReadSingle ();
			cellSize = ctx.reader.ReadSingle ();
			cellHeight = ctx.reader.ReadSingle ();
			walkableHeight = ctx.reader.ReadSingle ();
			maxSlope = ctx.reader.ReadSingle ();
			maxEdgeLength = ctx.reader.ReadSingle ();
			editorTileSize = ctx.reader.ReadInt32 ();
			tileSizeX = ctx.reader.ReadInt32 ();
			nearestSearchOnlyXZ = ctx.reader.ReadBoolean ();
			useTiles = ctx.reader.ReadBoolean ();
			relevantGraphSurfaceMode = (RelevantGraphSurfaceMode)ctx.reader.ReadInt32 ();
			rasterizeColliders = ctx.reader.ReadBoolean ();
			rasterizeMeshes = ctx.reader.ReadBoolean ();
			rasterizeTerrain = ctx.reader.ReadBoolean ();
			rasterizeTrees = ctx.reader.ReadBoolean ();
			colliderRasterizeDetail = ctx.reader.ReadSingle ();
			forcedBoundsCenter = ctx.DeserializeVector3 ();
			forcedBoundsSize = ctx.DeserializeVector3 ();
			mask = ctx.reader.ReadInt32 ();

			int count = ctx.reader.ReadInt32 ();
			tagMask = new List<string> (count);
			for (int i = 0; i < count; i++) {
				tagMask.Add (ctx.reader.ReadString());
			}

			showMeshOutline = ctx.reader.ReadBoolean ();
			showNodeConnections = ctx.reader.ReadBoolean ();
			terrainSampleSize = ctx.reader.ReadInt32 ();

			// These were originally forgotten but added in an upgrade
			// To keep backwards compatibility, they are only deserialized
			// If they exist in the streamed data
			walkableClimb = ctx.DeserializeFloat (walkableClimb);
			minRegionSize = ctx.DeserializeFloat (minRegionSize);

			// Make the world square if this value is not in the stream
			tileSizeZ = ctx.DeserializeInt (tileSizeX);
		}
开发者ID:mBeierl,项目名称:GGJ16,代码行数:44,代码来源:RecastGenerator.cs

示例4: DeserializeSettings

		public override void DeserializeSettings ( GraphSerializationContext ctx ) {
			
			base.DeserializeSettings (ctx);
			
			characterRadius = ctx.reader.ReadSingle ();
			contourMaxError = ctx.reader.ReadSingle ();
			cellSize = ctx.reader.ReadSingle ();
			cellHeight = ctx.reader.ReadSingle ();
			walkableHeight = ctx.reader.ReadSingle ();
			maxSlope = ctx.reader.ReadSingle ();
			maxEdgeLength = ctx.reader.ReadSingle ();
			editorTileSize = ctx.reader.ReadInt32 ();
			tileSizeX = ctx.reader.ReadInt32 ();
			nearestSearchOnlyXZ = ctx.reader.ReadBoolean ();
			useTiles = ctx.reader.ReadBoolean ();
			relevantGraphSurfaceMode = (RelevantGraphSurfaceMode)ctx.reader.ReadInt32 ();
			rasterizeColliders = ctx.reader.ReadBoolean ();
			rasterizeMeshes = ctx.reader.ReadBoolean ();
			rasterizeTerrain = ctx.reader.ReadBoolean ();
			rasterizeTrees = ctx.reader.ReadBoolean ();
			colliderRasterizeDetail = ctx.reader.ReadSingle ();
			forcedBoundsCenter = ctx.DeserializeVector3 ();
			forcedBoundsSize = ctx.DeserializeVector3 ();
			mask = ctx.reader.ReadInt32 ();

			int count = ctx.reader.ReadInt32 ();
			tagMask = new List<string> (count);
			for (int i = 0; i < count; i++) {
				tagMask.Add (ctx.reader.ReadString());
			}

			showMeshOutline = ctx.reader.ReadBoolean ();
			showNodeConnections = ctx.reader.ReadBoolean ();
			terrainSampleSize = ctx.reader.ReadInt32 ();
		}
开发者ID:moderndelta137,项目名称:Shadow_Sword,代码行数:35,代码来源:RecastGenerator.cs


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