public override void OnCollisionEnter2D(Collision2D col) { if (col.gameObject.GetComponent <PlayerController>()) { sharedInventory.AddItem(item); EventPickUp.Invoke(); Destroy(this.gameObject); } }
public override void OnCollisionEnter2D(Collision2D col) { if (col.gameObject.GetComponent <PlayerController>()) { col.gameObject.GetComponent <PlayerStats>().AddCurrency(Amount); EventPickUp.Invoke(); Destroy(this.gameObject); } }