void OnCollisionEnter(Collision col) { if (IgnoreObjects.Contains(col.gameObject)) { return; } CurrentCollisions.Add(col.gameObject); OnEnter?.Invoke(this, col.gameObject); }
void OnCollisionEnter(Collision collision) { if (collisionEnterEvent != null) { collisionEnterEvent.Invoke(collision); } }
void OnCollisionEnter2D(Collision2D collision2D) { if (collision2D.gameObject.tag.Equals("Player")) { MathTrialManager.Instance.RequestMathTrial(this); } else { CollisionEnterEvent?.Invoke(collision2D); } }
/// <summary> /// on colliding with another unit, deal damage if it is the opposing side /// </summary> /// <param name="collision"></param> protected virtual void OnTriggerStay2D(Collider2D collision) { UnitController u = collision.transform.root.GetComponent <UnitController>(); if (u != null && u.unitType != unitType && canDetect) { if (!hitList.Contains(u.gameObject)) { hitList.Add(u.gameObject); WeaponCollisionEnterEvent.Invoke(u.gameObject); } } }
private void OnCollisionEnter(Collision other) { CollisionEnterEvent.Invoke(); }
private void OnCollisionEnter(Collision collision) { CollisionEnterEvent.Invoke(collision); }
private void OnCollisionEnter2D(Collision2D collision) { CollisionEnterEvent?.Invoke(this, EventArgs.Empty); }
public void OnCollisionEnter2D(Collision2D collision) { CollisionEnterEvent?.Invoke(collision); }
private void OnCollisionEnter2D(Collision2D collision) { // 衝突時に通知する CollisionEnterEvent?.Invoke(collision); }
private void OnCollisionEnter2D(Collision2D other) { CollisionEnterEvent?.Invoke(other); }
void OnCollisionEnter(Collision collision) { CollisionEnterEvent?.Invoke(collision.transform); }
void OnCollisionEnter2D(Collision2D col) { m_OnCollisionEnter.Invoke(col); }