// Use this for initialization void Awake() { curState = 0; navMeshAgent = GetComponent <NavMeshAgent>(); onDestination = true; soundCommunication = GetComponent <soundCommunication>(); food = null; //navMeshAgent.destination = Vector3.zero; animator = this.gameObject.GetComponent <Animator>(); }
void OnTriggerEnter(Collider other) { soundCommunication sc = other.GetComponent <soundCommunication>(); if (!sc || !sc.enabled) { return; } if (!sourceNear.clip) { return; } if (!playbackDevice) { sc.ReceiveSound(currentWord); } else { foreach (fishDictionary.word word in receivedWords) { sc.ReceiveSound(word); } } }
// Use this for initialization void Start() { soundCommunication = GetComponent <soundCommunication>(); words = dictionary.dictionary; }