Пример #1
0
    private void OnTriggerEnter2D(Collider2D collision)
    {
        IPickable _tempPick = collision.gameObject.GetComponent <IPickable>();

        if (_tempPick != null)
        {
            scrap = Mathf.Round(scrap + _tempPick.PickItem());
        }
    }