void OnTriggerEnter2D(Collider2D other) { if (other.tag == "Player") { Instantiate(explosionPrefab, transform.position, transform.localRotation); Player.SetCollectionable(); score.AddScoreCollectable(); Destroy(gameObject); } }
void OnTriggerEnter2D(Collider2D other) { if (other.tag == "Player") { Instantiate(explosionPrefab, transform.position, transform.localRotation); Player.SetCollectionable(); score.AddScoreCollectable(); Destroy(gameObject); } }