public virtual void SpawnDoctors() { for (int i = 0; i < numDoctors; i++) { GameObject person = Instantiate(doctorObject, new Vector3(Random.Range(worldMinX, worldMaxX), Random.Range(worldMinY, worldMaxY)), Quaternion.identity, objectContainer.transform); Doctor_AIScript docScript = person.GetComponent <Doctor_AIScript>(); docScript.worldObject = gameObject; docsList.Add(docScript); } }
override public void SpawnDoctors() { for (int i = 0; i < (PhotonNetwork.playerList.Length == 1 ? DOCS_ONLY_MODE : numDoctors); i++) { GameObject person = PhotonNetwork.Instantiate("DoctorNetworked", new Vector3(Random.Range(worldMinX, worldMaxX), Random.Range(worldMinY, worldMaxY)), Quaternion.identity, 0); person.transform.parent = objectContainer.transform; Doctor_AIScript docScript = person.GetComponent <Doctor_AIScript>(); docScript.worldObject = gameObject; docsList.Add(docScript); } }