/// <summary> /// Pops first patient from queue /// </summary> /// <returns>patient in front of queue. If queue is empty, returns null</returns> public Patient PopQueue() { //if (this.playerQueue.First<Patient>() == null) //{ // return null; //} if (!this.playerQueue.Any()) { return(null); } Patient popped = playerQueue.First(); //Patient popped = this.playerQueue.First<Player>().patient; this.playerQueue.RemoveAt(0); if (playerQueue.Any()) { foreach (Patient patient in playerQueue) { patient.transform.position = new Vector3(coordsToPlace.x, coordsToPlace.y + 100, patient.transform.position.z); } //foreach (Player patient in playerQueue) //{ // patient.patient.transform.position = new Vector3(coordsToPlace.x, // coordsToPlace.y + 100, // patient.patient.transform.position.z); //} } popped.NewDoor(null); popped.roomID = doorID; popped.transform.position = this.officeCoords; ButtonHandler.EnableDisableButtons(true); return(popped); }
//public localPlayer; // Start is called before the first frame update void Start() { gameObject.name = "Local"; if (isLocalPlayer) { PlayerCamera.SetActive(true); } else { PlayerCamera.SetActive(false); } door = null; cure = Cure.None; GlobalVariables.patientList.Add(this); patientID = GlobalVariables.patientList.Count; health.text = String.Concat("Health: :", GetRandomHealth().ToString()); ButtonHandler.EnableDisableButtons(false); //this.gameObject.GetComponent<Camera>(). }