public IEnumerator CallPolice() { yield return(new WaitForSeconds(policeCallDurationSeconds)); Rigidbody police = Instantiate(policemanPrefab); police.GetComponent <Policeman>().DoorComplain(); state = new JehovahDeparting(this); }
void OnTriggerEnter(Collider other) { if (other.CompareTag(doorstepTag)) { state = new JehovahPressingDoorbell(this); } else if (other.CompareTag(spawnPointTag)) { state.Leave(); } }
public IEnumerator Talk() { source.clip = talkingSounds[Random.Range(0, talkingSounds.Length - 1)]; source.Play(); FindObjectOfType <PlayerController>().setInteracting(true); state = new JehovahTalking(this); dialogueText.GetComponent <Text>().text = "Have you heard the good news?"; dialogueText.SetActive(true); yield return(new WaitForSeconds(TalkDurationSeconds)); FindObjectOfType <PlayerController>().setInteracting(false); dialogueText.SetActive(false); state = new JehovahDeparting(this); }
// Use this for initialization public override void Start() { base.Start(); currentDoorbellPresses = 0; state = new JehovahArriving(this); }