private void OnTriggerEnter(Collider other) { StateManager states = other.transform.GetComponentInParent <StateManager>(); if (states != null) { if (states != ourStates) { states.OnHit(ourStates); } } }