コード例 #1
0
    private void OnTriggerEnter2D(Collider2D collision)
    {
        Activatable activatable = collision.GetComponent <Activatable>();

        if (activatable)
        {
            activatable.Action(this);
        }
    }