workaround: when board of devs is initialised with processsing disabled, the void cards gets messed up.

This commit is contained in:
betalars 2023-07-18 15:55:28 +02:00
parent 12226e04f3
commit 14e310c8eb
1 changed files with 8 additions and 1 deletions

View File

@ -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))