Fix C# _Process method signatures

This commit is contained in:
Vojtech Krajnansky
2025-02-05 17:18:43 +01:00
parent 5dea521db6
commit ff89b4611e
2 changed files with 4 additions and 4 deletions

View File

@@ -104,7 +104,7 @@ released.
_animatedSprite = GetNode<AnimatedSprite2D>("AnimatedSprite2D");
}
public override _Process(float _delta)
public override void _Process(double delta)
{
if (Input.IsActionPressed("ui_right"))
{
@@ -252,7 +252,7 @@ released.
_animationPlayer = GetNode<AnimationPlayer>("AnimationPlayer");
}
public override void _Process(float _delta)
public override void _Process(double delta)
{
if (Input.IsActionPressed("ui_right"))
{

View File

@@ -72,7 +72,7 @@ Add these two and it's possible to guess almost exactly when sound or music will
GetNode<AudioStreamPlayer>("Player").Play();
}
public override void _Process(float _delta)
public override void _Process(double delta)
{
double time = (Time.GetTicksUsec() - _timeBegin) / 1000000.0d;
time = Math.Max(0.0d, time - _timeDelay);
@@ -140,7 +140,7 @@ Here is the same code as before using this approach:
GetNode<AudioStreamPlayer>("Player").Play();
}
public override void _Process(float _delta)
public override void _Process(double delta)
{
double time = GetNode<AudioStreamPlayer>("Player").GetPlaybackPosition() + AudioServer.GetTimeSinceLastMix();
// Compensate for output latency.