protected void OnTriggerEnter(Collider co) { if (co.tag == "Turret" && co is BoxCollider) { CannonFire cf = co.gameObject.GetComponent <CannonFire> (); if (cf != null) { NeuralNode node = cf.GetNode(); if (node != null) { towersToConfound [node] = new List <int> (); } } } }
protected virtual void OnTriggerExit(Collider co) { if (co.tag == "Turret" && co is BoxCollider) { CannonFire cf = co.gameObject.GetComponent <CannonFire> (); if (cf != null) { NeuralNode node = cf.GetNode(); if (node != null) { List <int> confoundedIndices = towersToConfound [node]; node.ResetWeights(confoundedIndices); node.RemoveFromEnemiesToInform(this); node.InformEnemies(confoundedIndices); } } } } //OnTriggerExit()