Exemple #1
0
 /// <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);
 }
Exemple #2
0
 /// <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);
 }