fix camera shake intensities (20x) so shake is actually visible
parent
376930483a
commit
4780d9ae36
|
|
@ -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()
|
||||
queue_free()
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in New Issue