quellus / GDTuber

A dynamic PNGTuber program made in Godot
MIT License
21 stars 13 forks source link

BUG: blinking timer handled poorly #22

Closed quellus closed 2 months ago

quellus commented 3 months ago

Describe the bug Blinking timer throws an error to the console when it's started. Disabling and reenabling blinking also creates multiple timers causing the avatar to blink too quickly

To Reproduce Steps to reproduce the behavior:

  1. Create a new blinking avatar
  2. Error is thrown in debug console
  3. Disable blinking and reenable it
  4. Avatar blinks at twice the speed
  5. Repeating step 3 further increases the blinking speed

Expected behavior The program should run without error. The avatar's blinking speed should be unaffected by toggling the blinking setting.

Environment:

Additional context I'm a little confused by the debug error. As far as I can tell, we are adding the timer to the tree before calling start() for the first time. More research necessary.

quellus commented 3 months ago

The blink timer also doesn't get cleaned up after disabling blink on a ScreenObject that previously had it enabled.