예제 #1
0
    void OnCollisionEnter(Collision col)
    {
        if (IgnoreObjects.Contains(col.gameObject))
        {
            return;
        }

        CurrentCollisions.Add(col.gameObject);
        OnEnter?.Invoke(this, col.gameObject);
    }
예제 #2
0
 void OnCollisionEnter(Collision collision)
 {
     if (collisionEnterEvent != null)
     {
         collisionEnterEvent.Invoke(collision);
     }
 }
예제 #3
0
 void OnCollisionEnter2D(Collision2D collision2D)
 {
     if (collision2D.gameObject.tag.Equals("Player"))
     {
         MathTrialManager.Instance.RequestMathTrial(this);
     }
     else
     {
         CollisionEnterEvent?.Invoke(collision2D);
     }
 }
예제 #4
0
    /// <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);
            }
        }
    }
예제 #5
0
 private void OnCollisionEnter(Collision other)
 {
     CollisionEnterEvent.Invoke();
 }
예제 #6
0
 private void OnCollisionEnter(Collision collision)
 {
     CollisionEnterEvent.Invoke(collision);
 }
예제 #7
0
파일: Edge.cs 프로젝트: ASh-911/FlappyDunk
 private void OnCollisionEnter2D(Collision2D collision)
 {
     CollisionEnterEvent?.Invoke(this, EventArgs.Empty);
 }
예제 #8
0
 public void OnCollisionEnter2D(Collision2D collision)
 {
     CollisionEnterEvent?.Invoke(collision);
 }
예제 #9
0
 private void OnCollisionEnter2D(Collision2D collision)
 {
     // 衝突時に通知する
     CollisionEnterEvent?.Invoke(collision);
 }
예제 #10
0
 private void OnCollisionEnter2D(Collision2D other)
 {
     CollisionEnterEvent?.Invoke(other);
 }
예제 #11
0
 void OnCollisionEnter(Collision collision)
 {
     CollisionEnterEvent?.Invoke(collision.transform);
 }
예제 #12
0
 void OnCollisionEnter2D(Collision2D col)
 {
     m_OnCollisionEnter.Invoke(col);
 }