// Use this for initialization void Start() { timer = 0.0f; numChars = characters.transform.childCount; Debug.Log (numChars); behaviourScripts = new MasterBehaviour[numChars]; for (int i = 0; i < numChars; i++) { MasterBehaviour mb = characters.transform.GetChild(i).GetComponent<MasterBehaviour>(); mb.Starta(plane, swamps, nodeSize); behaviourScripts[i] = mb; } pathfinder = new PathfindingScheduler (); pathFindingChars = new LinkedList<GameObject> (); //get rid of swamp colliders if (swamps != null) { int swampCount = swamps.transform.childCount; for (int k = 0; k < swampCount; k++) { swamps.transform.GetChild (k).GetComponent<MeshCollider> ().enabled = false; } } shootDistance = 10f; }
// Use this for initialization void Start() { timer = 0.0f; numChars = characters.transform.childCount; Debug.Log(numChars); behaviourScripts = new MasterBehaviour[numChars]; for (int i = 0; i < numChars; i++) { MasterBehaviour mb = characters.transform.GetChild(i).GetComponent <MasterBehaviour>(); mb.Starta(plane, swamps, nodeSize); behaviourScripts[i] = mb; } pathfinder = new PathfindingScheduler(); pathFindingChars = new LinkedList <GameObject> (); //get rid of swamp colliders if (swamps != null) { int swampCount = swamps.transform.childCount; for (int k = 0; k < swampCount; k++) { swamps.transform.GetChild(k).GetComponent <MeshCollider> ().enabled = false; } } shootDistance = 10f; }
// Use this for initialization void Start() { numChars = characters.transform.childCount; // Debug.Log (numChars); behaviourScripts = new MasterBehaviour[numChars]; for (int i = 0; i < numChars; i++) { MasterBehaviour mb = characters.transform.GetChild(i).GetComponent<MasterBehaviour>(); mb.Starta(plane, nodeSize, sniper.transform.position); behaviourScripts[i] = mb; } pathfinder = new PathfindingScheduler (); pathFindingChars = new LinkedList<GameObject> (); deadSet = new List<GameObject>(); seenDeadSet = new List<Vector3> (); shootDistance = 10f; sightDist = 100.0f; maxDist = 100f; NB = new NaiveBayes (behaviourScripts [0].reachGoal.state.sGrid.hiddenSpaceCost, maxDist); NB.Starta (); currentlySearching = new List<MasterBehaviour> (); }