private void OnCollisionStay(Collision other) { foreach (var tag in tagsToCompare) { if (other.gameObject.CompareTag(tag) && other.gameObject == objCollided) { CollisionStay.Invoke(); } } }
internal void Collision(Collider2D other, CollisionPairState state, HitState hitState) { if (state.enter) { CollisionEnter?.Invoke(other, hitState); } if (state.stay) { CollisionStay?.Invoke(other, hitState); } if (state.exit) { CollisionExit?.Invoke(other, hitState); } }
private void OnCollisionStay(Collision other) => CollisionStay?.Invoke(other);
private void OnCollisionStay(Collision collision) { CollisionStay?.Invoke(this, new CollisionEventArgs(collision)); }
public void OnColiisionStay(Collision collision) { CollisionStay.Invoke(collision); }
private void OnCollisionStay(Collision collision) { CollisionStay?.Invoke(gameObject, collision); }