@@ -178,7 +178,10 @@ func _physics_process(delta):
178
178
# Add a delay of 'delta' before counting the blocks.
179
179
# Sometimes the last one doesn't get counted.
180
180
if explosion_delay :
181
- # yield(get_tree().create_timer(delta), "timeout")
181
+ # Removed the yield timer because it was throwing
182
+ # 'Resumed after yield, but class instance is gone' errors
183
+ # when freeing the blocks.
184
+ # yield(get_tree().create_timer(delta), "timeout")
182
185
explosion_delay_timer_limit = delta
183
186
explosion_delay_timer += delta
184
187
if explosion_delay_timer > explosion_delay_timer_limit :
@@ -270,7 +273,10 @@ func explosion(delta):
270
273
# Sometimes 'object.detonate' is set to 'false' so quickly that the explosion never happens.
271
274
# If this happens, try setting 'explosion_delay' to 'true'.
272
275
if explosion_delay :
273
- # yield(get_tree().create_timer(delta), "timeout")
276
+ # Removed the yield timer because it was throwing
277
+ # 'Resumed after yield, but class instance is gone' errors
278
+ # when freeing the blocks.
279
+ # yield(get_tree().create_timer(delta), "timeout")
274
280
explosion_delay_timer_limit = delta
275
281
explosion_delay_timer += delta
276
282
if explosion_delay_timer > explosion_delay_timer_limit :
@@ -289,7 +295,7 @@ func _on_debris_timer_timeout():
289
295
child .set_mode (MODE_STATIC )
290
296
child .get_node (object .collision_name ).disabled = true
291
297
292
- # Remove the self element as we don't need it anymore.
298
+ # Remove the self element as we don't need it anymore.
293
299
self .queue_free ()
294
300
else :
295
301
var color_r = child .modulate .r
0 commit comments