/// <summary> /// Remove current gameObject from a list of "hearers" that belongs to the entityObj /// </summary> /// <param name="type">Type of entity</param> /// <param name="entityObj">GameObject of an entity</param> public void RemoveFromHearList(EnemySenses.EntityHearTypes type, GameObject entityObj) { entityObj.GetComponent <EntityEventHandler>().RemoveHearer(ReceiveNoiseSignal); }
/// <summary> /// Adds current gameObject to a list of "hearers" that belongs to the entityObj /// </summary> /// <param name="type">Type of entity</param> /// <param name="entityObj">GameObject of an entity</param> public void AddToHearList(EnemySenses.EntityHearTypes type, GameObject entityObj) { // TODO: add a delegate to entityeventhandler entityObj.GetComponent <EntityEventHandler>().AddHearer(ReceiveNoiseSignal); }