コード例 #1
0
    private void OnTriggerEnter2D(Collider2D collider)
    {
        if (string.Compare(collider.name, _collidedObjectName) == 0)
        {
            _flowMachine.TriggerUnityEvent(_boltEventName);
        }

        if (_tag != "" && collider.CompareTag(_tag))
        {
            _flowMachine.TriggerUnityEvent(_boltEventName);
        }
    }
コード例 #2
0
 private void OnCollisionEnter2D(UnityEngine.Collision2D collision)
 {
     if (collision.collider.CompareTag(_tag))
     {
         _flowMachine.TriggerUnityEvent(_unityEventName);
     }
 }