IEnumerator StartSequenceHiders() { playerObject1.BlockMovement(); playerObject2.BlockMovement(); foreach (GameObject AI in GameObject.FindGameObjectsWithTag("NPC")) { AIMove = AI.GetComponent <AIMovement>(); AIMove.BlockMovement(); } //AIMove.BlockMovement(); hunterLookScreen.SetActive(true); yield return(new WaitForSeconds(2)); vampireAwayMessage.SetActive(true); yield return(new WaitForSeconds(4)); vampireAwayMessage.SetActive(false); hunterLocationMessage.SetActive(true); yield return(new WaitForSeconds(4)); hunterLookScreen.SetActive(false); playerObject1.DisplayRing(); yield return(new WaitForSeconds(4)); vampireLookScreen.SetActive(true); hunterAwayMessage.SetActive(true); yield return(new WaitForSeconds(4)); hunterAwayMessage.SetActive(false); vampireLocationMessage.SetActive(true); yield return(new WaitForSeconds(4)); vampireLookScreen.SetActive(false); playerObject2.DisplayRing(); yield return(new WaitForSeconds(4)); countdownScreen.SetActive(true); count3.SetActive(true); yield return(new WaitForSeconds(1)); count2.SetActive(true); count3.SetActive(false); yield return(new WaitForSeconds(1)); count1.SetActive(true); count2.SetActive(false); yield return(new WaitForSeconds(1)); countdownScreen.SetActive(false); playerObject1.AllowMovement(); playerObject2.AllowMovement(); foreach (GameObject AI in GameObject.FindGameObjectsWithTag("NPC")) { AIMove = AI.GetComponent <AIMovement>(); AIMove.AllowMovement(); } countDown.StartCounting(); }
public void AllowMovement() { AIMovement garbageMan = GetComponentInParent <AIMovement>(); if (garbageMan) { garbageMan.AllowMovement(); } }