예제 #1
0
    private void OnTriggerStay2D(Collider2D collision)
    {
        ThrownItemController thrownItem = collision.GetComponent <ThrownItemController>();

        if (thrownItem != null)
        {
            if (thrownItem.item.effector == effector && thrownItem.reactable)
            {
                parent.GetComponent <ReactableObject>().React();
            }
        }
    }
예제 #2
0
    private void OnTriggerEnter2D(Collider2D collision)
    {
        //Eventually set up projectile items here
        ThrownItemController thrownItem = collision.GetComponent <ThrownItemController>();

        if (thrownItem != null)
        {
            if (thrownItem.item.effector == effector && thrownItem.reactable)
            {
                parent.GetComponent <ReactableObject>().React();
            }
        }
    }