// Use this for initialization void Start() { //find objects that are ghosts and get their ghost evac scripts ghosts = GameObject.FindGameObjectsWithTag("Ghost"); foreach (GameObject go in ghosts) { ge = go.GetComponent <GhostEvac>(); } //get the sound source = GetComponentInParent <AudioSource>(); }
//NavMeshAgent nma; // Use this for initialization void Start() { fleeing = false; chasing = false; stunned = false; idle = false; spooping = false; enemy = GetComponentInParent <Enemy>(); sr = GetComponent <SpriteRenderer>(); ss = GetComponentInParent <SpoopScript>(); ge = GetComponentInParent <GhostEvac>(); //nma.GetComponentInParent<NavMeshAgent>(); corgi = GameObject.Find("Player 1"); }