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


C# Job.CreateAndAddChildJob方法代码示例

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


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

示例1: InitiateCourseAroundObstacleTo

    protected void InitiateCourseAroundObstacleTo(Vector3 location) {
        D.Log("Initiating obstacle avoidance course. Distance to destination = {0}.", Vector3.Distance(Data.Position, location));
        if (_pilotJob != null && _pilotJob.IsRunning) {
            _pilotJob.Kill();
        }

        Vector3 waypointAroundObstacle = GetWaypointAroundObstacleTo(location);
        _pilotJob = new Job(EngageHomingCourseTo(waypointAroundObstacle), true);
        _pilotJob.CreateAndAddChildJob(EngageHomingCourseToTarget());
    }
开发者ID:Maxii,项目名称:UnityEntry,代码行数:10,代码来源:FleetNavigator.cs

示例2: InitiateCourseAroundObstacleTo

    private void InitiateCourseAroundObstacleTo(Vector3 location) {
        D.Log("{0} plotting course to avoid obstacle inroute to location {1}. Distance to location: {2}.", _fleet.FullName, location, Vector3.Distance(_data.Position, location));
        if (_pilotJob != null && _pilotJob.IsRunning) {
            _pilotJob.Kill();
        }

        Vector3 waypointAroundObstacle = GetWaypointAroundObstacleTo(location);
        _pilotJob = new Job(EngageDirectCourseTo(waypointAroundObstacle), true);
        _pilotJob.CreateAndAddChildJob(EngageDirectCourseToTarget());
    }
开发者ID:Maxii,项目名称:CodeEnv.Master,代码行数:10,代码来源:FleetNavigator.cs

示例3: InitiateCourseAroundObstacleTo

 private void InitiateCourseAroundObstacleTo(Vector3 location) {
     D.Log("{0} initiating course to avoid obstacle to {1}. Distance: {2}.", _ship.FullName, location, Vector3.Distance(_data.Position, location));
     DisengageAutoPilot();   // can be called while already engaged
     // even if this is an obstacle that has appeared on the way to another obstacle avoidance waypoint, go around it, then try direct to target
     Vector3 waypointAroundObstacle = GetWaypointAroundObstacleTo(location);
     _pilotJob = new Job(EngageDirectCourseTo(waypointAroundObstacle), true);
     _pilotJob.CreateAndAddChildJob(EngageDirectCourseToTarget());
 }
开发者ID:Maxii,项目名称:CodeEnv.Master,代码行数:8,代码来源:Helm.cs


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