// TODO: put smarter code for determining how many communists there are at game start //For example, there can never be more than 10 or less than 2 void Start() { dossierCanvas.enabled = false; dossierActive = false; dossier = ScriptableObject.CreateInstance <DossierDataClass> (); score.text = communistPower.ToString(); spawnPoints = GameObject.FindGameObjectsWithTag("WayPoint"); SetBuildings(); Debug.Log("Spawning Citizens"); for (int i = 0; i < population; i++) { int spawnPointChoice = Random.Range(0, 16); citizens[i] = (GameObject)Instantiate(citizen, spawnPoints[spawnPointChoice].transform.position, Quaternion.identity); possibleCrimes [0] = robberyPrefab; possibleCrimes [1] = arsonPrefab; } FindCommunists(); Debug.Log(communists.Count); }
// TODO: put smarter code for determining how many communists there are at game start //For example, there can never be more than 10 or less than 2 void Start() { dossierCanvas.enabled = false; dossierActive = false; dossier = ScriptableObject.CreateInstance<DossierDataClass> (); score.text = communistPower.ToString (); spawnPoints = GameObject.FindGameObjectsWithTag ("WayPoint"); SetBuildings (); Debug.Log ("Spawning Citizens"); for (int i = 0; i < population; i++) { int spawnPointChoice = Random.Range(0, 16); citizens[i] =(GameObject) Instantiate (citizen, spawnPoints[spawnPointChoice].transform.position, Quaternion.identity); possibleCrimes [0] = robberyPrefab; possibleCrimes [1] = arsonPrefab; } FindCommunists (); Debug.Log (communists.Count); }