I have a CPUParticles2D node, but when I try to reference it in the code, I get the below error:
(I am using the .NET version of Godot)
And here is the part of the code which causes the error:
public void GameOver()
{
var DeathParticles = GetNode<CPUParticles2D>("BurstParticle");
var player = GetNode<playerMovement>("Player");
DeathParticles.Position = player.Position;
DeathParticles.one_shot = true;
DeathParticles.emitting = true;
GetNode<Timer>("MobTimer").Stop();
GetNode<Timer>("ScoreTimer").Stop();
GetNode<hud>("HUD").ShowGameOver();
GetNode<AudioStreamPlayer>("Music").Stop();
GetNode<AudioStreamPlayer2D>("DeathSound").Play();
}