I get used to creating a new instances of classes in the code, not in using IDE interface.
So, here is my code:
extends Sprite
var timer;
func _ready():
timer = Timer.new()
timer.set_one_shot(false)
timer.set_timer_process_mode(TIMER_PROCESS_FIXED)
timer.set_wait_time(0.6)
timer.connect("timeout", self, "_timer_callback")
timer.start()
func _timer_callback():
if is_hidden():
show()
else:
hide()
My question is: How to define a timer timeout handler?
Updated the code. It doesn't work.