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


C# PathHandler.ClearPathIDs方法代碼示例

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


在下文中一共展示了PathHandler.ClearPathIDs方法的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.ClearPathIDs方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。