Added signal guards

This commit is contained in:
alex-kumpula 2023-11-11 21:36:00 -07:00
parent cf12a96a75
commit 5438bc9ffd
1 changed files with 11 additions and 5 deletions

View File

@ -76,14 +76,20 @@ public partial class TAS_System : Node
public void StartIncrementingFrames()
{
this.IsIncrementingFrames = true;
EmitSignal(SignalName.StartedIncrementing);
if (this.IsIncrementingFrames == false)
{
this.IsIncrementingFrames = true;
EmitSignal(SignalName.StartedIncrementing);
}
}
public void StopIncrementingFrames()
{
this.IsIncrementingFrames = false;
EmitSignal(SignalName.StoppedIncrementing);
if (this.IsIncrementingFrames == true)
{
this.IsIncrementingFrames = false;
EmitSignal(SignalName.StoppedIncrementing);
}
}
public void ResetFrameCount()