- Edited
I have this code in C# on a timer :
using Godot;
using System;
public class Timer : Godot.Timer
{
bool dead=false;
public override void _Process(float delta)
{
if (dead==false)
{
dead=true;
GD.Print("Start");
OneShot=true;
WaitTime=2f;
Start();
}
}
void _on_Timer_timeout()
{
Stop();
GD.Print("stop");
dead=false;
}
}
I stop the timer before returning the boolean value, but the timer continues.
Is this due to the _process loop running at the same time?
If anyone has a solution or an explanation.
Thanks in advance