本文整理匯總了C#中Pathfinding.Serialization.GraphSerializationContext.DeserializeFloat方法的典型用法代碼示例。如果您正苦於以下問題:C# GraphSerializationContext.DeserializeFloat方法的具體用法?C# GraphSerializationContext.DeserializeFloat怎麽用?C# GraphSerializationContext.DeserializeFloat使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Pathfinding.Serialization.GraphSerializationContext
的用法示例。
在下文中一共展示了GraphSerializationContext.DeserializeFloat方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: 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);
}