void OnTriggerEnter2D(Collider2D other) { if (other.GetComponent <PlayerController>() == null) { return; } ItemManager.AddCoins(CoinsToAdd); Destroy(gameObject); }