コード例 #1
0
    private void OnCollisionEnter2D(Collision2D collision)
    {
        IPickable pickable = collision.collider.GetComponent <IPickable>();

        if (pickable != null)
        {
            pickable.OnTouch(gameObject);
        }
    }