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


C# PathHandler.InitializeForPath方法代码示例

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


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

示例1: PrepareBase

 public void PrepareBase(PathHandler pathHandler)
 {
     if (pathHandler.PathID > this.pathID)
     {
         pathHandler.ClearPathIDs();
     }
     this.pathHandler = pathHandler;
     pathHandler.InitializeForPath(this);
     if (this.internalTagPenalties == null || this.internalTagPenalties.Length != 32)
     {
         this.internalTagPenalties = Path.ZeroTagPenalties;
     }
     try
     {
         this.ErrorCheck();
     }
     catch (Exception ex)
     {
         this.ForceLogError(string.Concat(new object[]
         {
             "Exception in path ",
             this.pathID,
             "\n",
             ex
         }));
     }
 }
开发者ID:GameDiffs,项目名称:TheForest,代码行数:27,代码来源:Path.cs

示例2: PrepareBase

		/** Prepares low level path variables for calculation.
		  * Called before a path search will take place.
		  * Always called before the Prepare, Initialize and CalculateStep functions
		  */
		public void PrepareBase (PathHandler pathHandler) {

			//Path IDs have overflowed 65K, cleanup is needed
			//Since pathIDs are handed out sequentially, we can do this
			if (pathHandler.PathID > pathID) {
				pathHandler.ClearPathIDs ();
			}

			//Make sure the path has a reference to the pathHandler
			this.pathHandler = pathHandler;
			//Assign relevant path data to the pathHandler
			pathHandler.InitializeForPath (this);

			// Make sure that internalTagPenalties is an array which has the length 32
			if (internalTagPenalties == null || internalTagPenalties.Length != 32)
				internalTagPenalties = ZeroTagPenalties;

			try {
				ErrorCheck ();
			} catch (System.Exception e) {
				ForceLogError ("Exception in path "+pathID+"\n"+e);
			}
		}
开发者ID:JtheSpaceC,项目名称:Breaking-The-Rules,代码行数:27,代码来源:Path.cs

示例3: PrepareBase

		/** Prepares low level path variables for calculation.
		  * Called before a path search will take place.
		  * Always called before the Prepare, Initialize and CalculateStep functions
		  */
		public void PrepareBase (PathHandler pathHandler) {
			
			//Path IDs have overflowed 65K, cleanup is needed
			//Since pathIDs are handed out sequentially, we can do this
			if (pathHandler.PathID > pathID) {
				pathHandler.ClearPathIDs ();
			}
			
			//Make sure the path has a reference to the pathHandler
			this.pathHandler = pathHandler;
			//Assign relevant path data to the pathHandler
			pathHandler.InitializeForPath (this);

			try {
				ErrorCheck ();
			} catch (System.Exception e) {
				ForceLogError ("Exception in path "+pathID+"\n"+e.ToString());
			}
		}
开发者ID:JackHR,项目名称:WaveIncoming,代码行数:23,代码来源:Path.cs


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