Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Mrpaolosarino |
Seriously , I’m done with this kind of code:
var can_proceed = true
func _process(delta):
if can_proceed == true:
play_this()
can_proceed = false
I know this works when making a call “one_shot” but jeez, is there any alternative to this?
You do not need to compare the boolean to true
explicitly. The following is sufficient:
if can_proceed:
play_this()
can_proceed = false
Calinou | 2021-07-02 14:47