public void AssignWhore(GameObject whorePrefab) { whoreGen = whorePrefab.GetComponent <WhoreGenerator> (); whoreGen.thisWhoreButton = gameObject; GetComponent <Image> ().sprite = whoreGen.w***e.whorePortrait; GetComponentInChildren <TextMeshProUGUI> ().text = whoreGen.w***e.whoreName; if (GameController.instance.CompareClient().Contains(whoreGen.w***e) == true) { FitsToClient(); } thisWhoreInfo = "Name: " + whoreGen.w***e.whoreName + "\n" + "Description: " + whoreGen.w***e.whoreDesc + "\n" + "Fits to client: " + whoreGen.w***e.fitsToClient; }
IEnumerator MeetTheClient(ClientGenerator clientToSurround) { foreach (GameObject w***e in listOfWhores) { WhoreGenerator whoreGen = w***e.GetComponent <WhoreGenerator> (); if (whoreGen.isOccupied == false) { w***e.GetComponent <CharacterMover> ().MoveToTarget(clientToSurround); if (whoreGen.thisWhoreButton == null) { GameObject buttonToSpawn = Instantiate(buttonPrefab, transform.position, transform.rotation); buttonToSpawn.transform.SetParent(whereToSpawnButtons.transform); buttonToSpawn.GetComponent <WhoreUIButton> ().AssignWhore(w***e); yield return(null); } else if (whoreGen.thisWhoreButton != null) { whoreGen.thisWhoreButton.SetActive(true); yield return(null); } yield return(null); } } }