Example #1
0
        //处理寻路
        private void HandleSeek(SeekPathCom seekPathCom, SpeedCom speedCom)
        {
            //请求寻路
            if (seekPathCom.ReqSeek)
            {
                Vector2Int curPos  = seekPathCom.CurrPos;
                Vector2Int tarPos  = seekPathCom.TargetPos;
                MapData    mapData = TempConfig.GetMapData(seekPathCom.MapPos);

                //List<Vector2Int> path = AstarHelp.FindPath(curPos, tarPos, mapData.ObstaclePos);
                //seekPathCom.MovePath = path;

                TaskHelp.AddTaskTwoParam(seekPathCom, mapData, ExcuteFindPath, FinishFindPath);
                seekPathCom.ReqSeek = false;
            }

            if (seekPathCom.CurrPos.Equals(seekPathCom.TargetPos))
            {
                return;
            }
            if (seekPathCom.MovePath == null || seekPathCom.MovePath.Count <= 0)
            {
                return;
            }

            MoveFollowPath(seekPathCom.Trans, seekPathCom.MovePath, ref seekPathCom.CurrPathIndex, speedCom.MaxSpeed, seekPathCom);
            //HandleSeekMove(seekPathCom, speedCom, viewCom);
        }
Example #2
0
        /// <summary>
        ///     Get help content for a well-known MSBuild task's praemeter.
        /// </summary>
        /// <param name="taskName">
        ///     The task name.
        /// </param>
        /// <param name="parameterName">
        ///     The parameter name.
        /// </param>
        /// <returns>
        ///     The parameter help content, or <c>null</c> if no content is available for it.
        /// </returns>
        public static string ForTaskParameter(string taskName, string parameterName)
        {
            if (String.IsNullOrWhiteSpace(parameterName))
            {
                throw new ArgumentException("Argument cannot be null, empty, or entirely composed of whitespace: 'metadataName'.", nameof(parameterName));
            }

            if (TaskHelp.TryGetValue(taskName, out Help.TaskHelp taskHelp) && taskHelp.Parameters.TryGetValue(parameterName, out Help.TaskParameterHelp parameterHelp))
            {
                return(parameterHelp.Description);
            }

            return(null);
        }
Example #3
0
        /// <summary>
        ///     Get help content for a well-known MSBuild task.
        /// </summary>
        /// <param name="taskName">
        ///     The task name.
        /// </param>
        /// <returns>
        ///     The task help content, or <c>null</c> if no content is available for it.
        /// </returns>
        public static string ForTask(string taskName)
        {
            if (String.IsNullOrWhiteSpace(taskName))
            {
                throw new ArgumentException("Argument cannot be null, empty, or entirely composed of whitespace: 'itemName'.", nameof(taskName));
            }

            if (TaskHelp.TryGetValue(taskName, out Help.TaskHelp taskHelp))
            {
                return(taskHelp.Description);
            }

            return(null);
        }
Example #4
0
 //线程执行决策层(只是读取数据操作)
 private void ThreadExcuteDec()
 {
     TaskHelp.AddTask(() =>
     {
         while (DecThreadRun)
         {
             Thread.Sleep(100);
             //更新决策
             ECSLayerLocate.Decision.ExecuteEntityDecision();
             ECSLayerLocate.Decision.ExecuteWorldDecision();
         }
     }, () => {
         ECSLocate.ECSLog.LogWarning("决策更新结束");
     });
 }
Example #5
0
 // Use this for initialization
 void Awake()
 {
     instance = this;
     //enabled = false;
     helpText = "";
     shownHelpText = "";
     goalEd=true;
     goalEmma=true;
     goalChris=false;
     task=false;
     hidden = false;
     currentStyle = DEFAULT_STYLE;
     SetHelpText();
     if(!gSkin) Debug.LogError("TaskHelp.Awake(): gSkin not set.");
 }