From ff89b4611e45e634f013e6f7d630a763e1a66ed5 Mon Sep 17 00:00:00 2001 From: Vojtech Krajnansky Date: Wed, 5 Feb 2025 17:18:43 +0100 Subject: [PATCH] Fix C# _Process method signatures --- tutorials/2d/2d_sprite_animation.rst | 4 ++-- tutorials/audio/sync_with_audio.rst | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tutorials/2d/2d_sprite_animation.rst b/tutorials/2d/2d_sprite_animation.rst index 912cbffbf..a508fe193 100644 --- a/tutorials/2d/2d_sprite_animation.rst +++ b/tutorials/2d/2d_sprite_animation.rst @@ -104,7 +104,7 @@ released. _animatedSprite = GetNode("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"); } - public override void _Process(float _delta) + public override void _Process(double delta) { if (Input.IsActionPressed("ui_right")) { diff --git a/tutorials/audio/sync_with_audio.rst b/tutorials/audio/sync_with_audio.rst index 9cd090c75..1a8c42bb6 100644 --- a/tutorials/audio/sync_with_audio.rst +++ b/tutorials/audio/sync_with_audio.rst @@ -72,7 +72,7 @@ Add these two and it's possible to guess almost exactly when sound or music will GetNode("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("Player").Play(); } - public override void _Process(float _delta) + public override void _Process(double delta) { double time = GetNode("Player").GetPlaybackPosition() + AudioServer.GetTimeSinceLastMix(); // Compensate for output latency.