// Update is called once per frame void Update() { if (health.hasDied == true) { anim.SetBool("IsDead", true); anim.SetInteger("Movespeed", -1); aiMovement.BlockMovement(); return; } if (aiMovement.isMoving == true) { anim.SetInteger("Movespeed", 1); return; } if (aiMovement.isDead == true) { anim.SetInteger("Movespeed", 2); return; } if (!anim.GetBool("IsDead")) { anim.SetInteger("Movespeed", 0); } //gameObject.transform.localRotation = gameObject.transform.parent.rotation; }
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(); }