From 4780d9ae369e042169c9c08b19185435866f5bb1 Mon Sep 17 00:00:00 2001 From: Artur David Date: Thu, 18 Jun 2026 10:31:00 +0200 Subject: [PATCH] fix camera shake intensities (20x) so shake is actually visible --- scripts/purge.gd | 5 +++-- scripts/witch.gd | 10 +++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/scripts/purge.gd b/scripts/purge.gd index db72763..fc6f73c 100644 --- a/scripts/purge.gd +++ b/scripts/purge.gd @@ -6,6 +6,7 @@ const FLASH_FADE_DURATION := 0.6 @onready var summon_circle: AnimatedSprite2D = $SummonCircle/AnimatedSprite2D func _ready() -> void: + process_mode = Node.PROCESS_MODE_ALWAYS summon_circle.sprite_frames = summon_circle.sprite_frames.duplicate() summon_circle.sprite_frames.set_animation_loop("default", false) summon_circle.animation_finished.connect(_unleash) @@ -13,7 +14,7 @@ func _ready() -> void: func _unleash() -> void: var camera = get_node("/root/Game/Camera2D") - camera.shake(0.5, 1.5) + camera.shake(0.5, 30) for enemy in get_tree().get_nodes_in_group("enemies"): if not is_instance_valid(enemy): @@ -39,4 +40,4 @@ func _flash() -> void: var tween = create_tween() tween.tween_property(rect, "color:a", 0.0, FLASH_FADE_DURATION) await tween.finished - queue_free() \ No newline at end of file + queue_free() diff --git a/scripts/witch.gd b/scripts/witch.gd index cc8428c..f5a8b75 100644 --- a/scripts/witch.gd +++ b/scripts/witch.gd @@ -69,7 +69,7 @@ func shoot_fireballs(): get_parent().add_child(fb) fb.launch(enemy.global_position) _play_fire_sfx() - camera.shake(0.15, 0.5) + camera.shake(0.15, 10) await get_tree().create_timer(0.12).timeout $AnimatedSprite2D.play("south") @@ -92,7 +92,7 @@ func shoot_fire_swirl(): var fs = fire_swirl.instantiate() fs.global_position = global_position get_parent().add_child(fs) - camera.shake(0.3, 0.8) + camera.shake(0.3, 16) func shoot_shuriken(): for i in range(shuriken_count): @@ -106,13 +106,13 @@ func shoot_tornado(): var tw = tornado.instantiate() tw.global_position = target.global_position if target != null else global_position get_parent().add_child(tw) - camera.shake(0.3, 0.8) + camera.shake(0.3, 16) func shoot_laser(): var ls = laser.instantiate() ls.global_position = global_position get_parent().add_child(ls) - camera.shake(0.4, 1.2) + camera.shake(0.4, 24) var asp = AudioStreamPlayer.new() asp.stream = _laser_sfx asp.volume_db = 6 @@ -125,7 +125,7 @@ func shoot_purge(): var pg = purge.instantiate() pg.global_position = global_position get_parent().add_child(pg) - camera.shake(0.3, 0.8) + camera.shake(0.3, 16) func take_damage(amount: int, attacker = null) -> void: if is_invincible: