private void OnTriggerEnter2D(Collider2D collider) { if (string.Compare(collider.name, _collidedObjectName) == 0) { _flowMachine.TriggerUnityEvent(_boltEventName); } if (_tag != "" && collider.CompareTag(_tag)) { _flowMachine.TriggerUnityEvent(_boltEventName); } }
private void OnCollisionEnter2D(UnityEngine.Collision2D collision) { if (collision.collider.CompareTag(_tag)) { _flowMachine.TriggerUnityEvent(_unityEventName); } }