本文整理汇总了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();
}
}
示例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;
}
}
}
示例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;
}
示例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> ();
}