private void OnAreaEntered(Area2D other) { Node parent = other.GetParent(); if (parent.Name.Contains("PowerUp")) { PowerUp powerUp = (PowerUp)parent; powerUp.Connect("AttackUpAcquired", this, nameof(OnAttackUpAcquired)); powerUp.Connect("FireRateUpAcquired", this, nameof(OnFireRateUpAcquired)); powerUp.Connect("SpeedUpAcquired", this, nameof(OnSpeedUpAcquired)); powerUp.Acquire(); } else { Destroy(); } }