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


C# Grid.initStart方法代码示例

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


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

示例1: Start

    // Use this for initialization
    void Start()
    {
        iChar = 0;
        numChars = characters.transform.childCount;
        Debug.Log ("numChars: " + numChars);

        timer = 0.0f;
        searchTime = 2.0f;

        G = GetComponent<Grid> ();
        G.initStart ();
        graph = new Graph (G);
        for (int i = 0; i < numChars; i++) {
            Transform child = characters.transform.GetChild(i);
            reachGoal = child.GetComponent<ReachGoal> ();
            reachGoal.Start();
        }
    }
开发者ID:15466Group,项目名称:Project2_Old,代码行数:19,代码来源:Scheduler.cs

示例2: Start

 // Use this for initialization
 void Start()
 {
     iChar = 0;
     numChars = characters.transform.childCount;
     graph = new Graph (2.0f);
     states = new State[numChars];
     for (int i = 0; i < numChars; i++) {
         Transform child = characters.transform.GetChild(i);
         reachGoal = child.GetComponent<ReachGoal> ();
         reachGoal.Start();
         Grid G = new Grid(plane, goal, nodeSize, swamps);
         G.initStart();
         states[i] = new State(new List<Node> (), new List<Node> (), new Dictionary<Node, Node> (),
                               null, null, reachGoal.swampCost, G, null, false, false);
     }
     if (swamps != null) {
         int swampCount = swamps.transform.childCount;
         for (int k = 0; k < swampCount; k++) {
             swamps.transform.GetChild (k).GetComponent<MeshCollider> ().enabled = false;
         }
     }
 }
开发者ID:15466Group,项目名称:Project2,代码行数:23,代码来源:Scheduler.cs

示例3: Starta

 // Use this for initialization
 public override void Starta()
 {
     base.Starta ();
     dynamicLayer = 1 << LayerMask.NameToLayer ("Dynamic");
     acceleration = base.calculateAcceleration (target);
     isWanderer = false;
     isReachingGoal = true;
     hitNextNode = true;
     next = transform.position;
     nextCoords = next;
     transCoords = next;
     endCoords = new Vector3 (next.x + 10.0f, 0.0f, next.z + 10.0f);
     path = new List<Node> ();
     inArrivalRadius = false;
     arrivalRadius = 0.0f;
     Grid G = new Grid(plane, goalPos, nodeSize, swamps);
     G.initStart ();
     state = new State (new List<Node> (), new List<Node> (), new Dictionary<Node, Node> (),
                       null, null, swampCost, G, null, false, false);
     speedMax = 20.0f;
 }
开发者ID:15466Group,项目名称:ProjectDemo,代码行数:22,代码来源:ReachGoal.cs

示例4: Starta

 // Use this for initialization
 public override void Starta()
 {
     base.Starta ();
     dynamicLayer = 1 << LayerMask.NameToLayer ("Dynamic");
     acceleration = base.calculateAcceleration (target);
     isWanderer = false;
     isReachingGoal = true;
     rayDistDefault = 12.0f;
     rayDist = rayDistDefault;
     closeRayDistDefault = 5.0f;
     closeRayDist = closeRayDistDefault;
     speedMaxDefault = 20.0f;
     speedMax = speedMaxDefault;
     hitNextNode = true;
     next = transform.position;
     nextCoords = next;
     transCoords = next;
     endCoords = new Vector3 (next.x + 10.0f, 0.0f, next.z + 10.0f);
     path = new List<Node> ();
     inArrivalRadius = false;
     arrivalRadius = nodeSize*2;
     G = new Grid(plane, goalPos, nodeSize, sniperPos);
     G.initStart ();
     //		Node estimEndNode = new Node(false, Vector3.zero, 0, 0, Mathf.Infinity, 3.0f);
     //
     //		List<Node> estimPath = new List<Node> ();
     state = new State (new List<Node> (), new List<Node> (), new Dictionary<Node, Node> (),
                       null, null, G, null, false, false);
     closeRayDist = nodeSize / 1.5f;
     //		deadPeopleSeen = new List<Vector3> ();
 }
开发者ID:15466Group,项目名称:Project3,代码行数:32,代码来源:ReachGoal.cs


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