// 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(); } }
// 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(); } }
// 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; } } }