void OnTriggerEnter(Collider other) { if (CollisionLayers == (CollisionLayers | (1 << other.gameObject.layer))) { onTrigger?.Invoke(other); } }
private void OnTriggerEnter2D(Collider2D other) { if (other.gameObject.tag != "Player") { TriggerEnter?.Invoke(this, other.gameObject); } }
private void OnTriggerEnter(Collider otherCollider) { if (TriggerEnter != null) { TriggerEnter.Invoke(otherCollider); } }
public void OnTriggerEnter(Collider other) { if (CheckLayer(other)) { TriggerEnter?.Invoke(other); } }
private void OnTriggerEnter(Collider other) { if (!triggerEntered) { triggerEntered = true; TriggerEnter?.Invoke(other); } }
private void OnTriggerEnter(Collider other) { var entity = other.GetComponentInParent <IGameEntity>(); if (entity != null && TriggerEnter != null) { TriggerEnter?.Invoke(entity); } }
private void OnTriggerEnter(Collider other) { if (other.CompareTag("Player")) { return; } TriggerEnter?.Invoke(); }
protected virtual void OnTriggerEnter(EventArgs e) { Log("Entered trigger: " + _name); if (debugLevel > 1) { ShowMessage("Entered trigger: " + ToString()); } TriggerEnter?.Invoke(this, index, e); }
internal void OnTriggerEnter(Collider collider) { TriggerEnter?.Invoke(collider); var rigidbody = AttachedRigidBody; if (rigidbody) { rigidbody.OnTriggerEnter(collider); } }
internal void Trigger(Collider2D other, CollisionPairState state) { if (state.enter) { TriggerEnter?.Invoke(other); } if (state.stay) { TriggerStay?.Invoke(other); } if (state.exit) { TriggerExit?.Invoke(other); } }
private void OnTriggerEnter(Collider other) { if (hitLayers != (hitLayers | (1 << other.gameObject.layer))) { return; } if (onlyTriggerOnce && hasTriggered) { return; } hasTriggered = true; if (onTriggerEnterEvent != null) { onTriggerEnterEvent.Invoke(other); } if (disableAfter) { gameObject.SetActive(false); } }
private void OnTriggerEnter(Collider collider) { TriggerEnter?.Invoke(gameObject, collider); }
internal void OnTriggerEnter(Collider collider) { TriggerEnter?.Invoke(collider); }
private void OnTriggerEnter(Collider other) { TriggerEnter.Invoke(); }
private void OnTriggerEnter(Collider other) => TriggerEnter?.Invoke(other);
private void OnTriggerEnter2D(Collider2D collision) { TriggerEnter?.Invoke(_collider2D, collision); }
private void OnTriggerEnter(Collider col) { TriggerEnter?.Invoke(col.gameObject); }
private void OnTriggerEnter2D(Collider2D other) { TriggerEnter?.Invoke(this, other.gameObject); }
void OnTriggerEnter(Collider collider) => TriggerEnter?.Invoke(collider);
private void OnTriggerEnter(Collider other) { TriggerEnter?.Invoke(this, new TriggerEventArgs(other)); }
//private void OnCollisionEnter(Collision collision) //{ // TriggerEnter?.Invoke(collision.collider); //} //private void OnCollisionStay(Collision collision) //{ // TriggerStay?.Invoke(collision.collider); //} //private void OnCollisionExit(Collision collision) //{ // TriggerExit?.Invoke(collision.collider); //} public void RaiseTriggerEnter(Collider other) { TriggerEnter?.Invoke(other); }
private void OnTriggerEnter(Collider other) { TriggerEnter?.Invoke(other.gameObject); }