From 4141ef4e8583fc34b4735eb7115ed7f15706cd1d Mon Sep 17 00:00:00 2001 From: betalars Date: Tue, 18 Jul 2023 15:55:28 +0200 Subject: [PATCH] workaround: when board of devs is initialised with processsing disabled, the void cards gets messed up. --- src/logic-scenes/board/card.tscn | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/logic-scenes/board/card.tscn b/src/logic-scenes/board/card.tscn index b870db44..16fece1a 100644 --- a/src/logic-scenes/board/card.tscn +++ b/src/logic-scenes/board/card.tscn @@ -68,9 +68,16 @@ var void_active: $GPUParticles2D.emitting = become_void $Sprite2D.is_void = become_void void_active = become_void - + func _process(delta): + + if void_active != $GPUParticles2D.is_void: + $GPUParticles2D.is_void = void_active + $GPUParticles2D.emitting = void_active + $Sprite2D.is_void = void_active + if void_active and not State.reduce_motion: + noise_position += delta * 10 var random_position = Vector2(noise.get_noise_1d(noise_position*2), noise.get_noise_1d(-noise_position))