void OnTriggerEnter2D(Collider2D Other) { if (Other.GetComponent <Rigidbody2D> () == null) { return; } AmmoManager.AddPoints(AmmoToAdd); }
void OnTriggerEnter2D(Collider2D other) { if (other.GetComponent <Rigidbody2D>() == null) { return; } AmmoManager.AddPoints(PointsToAdd); Destroy(gameObject); }