Wires in new audio sound fxs
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -10,6 +10,8 @@ const POOL_SIZE := 8
|
|||||||
# Preloaded sound effects
|
# Preloaded sound effects
|
||||||
var _sounds: Dictionary = {
|
var _sounds: Dictionary = {
|
||||||
"enemy_hit": preload("res://assets/audio/sfx/enemy_hit.wav"),
|
"enemy_hit": preload("res://assets/audio/sfx/enemy_hit.wav"),
|
||||||
|
"enemy_death": preload("res://assets/audio/sfx/enemy_death.wav"),
|
||||||
|
"enemy_shoot": preload("res://assets/audio/sfx/enemy_shoot.wav"),
|
||||||
"player_hit": preload("res://assets/audio/sfx/player_hit.wav"),
|
"player_hit": preload("res://assets/audio/sfx/player_hit.wav"),
|
||||||
"player_shoot": preload("res://assets/audio/sfx/player_shoot.wav"),
|
"player_shoot": preload("res://assets/audio/sfx/player_shoot.wav"),
|
||||||
"explosion": preload("res://assets/audio/sfx/explosion.wav"),
|
"explosion": preload("res://assets/audio/sfx/explosion.wav"),
|
||||||
@@ -17,6 +19,9 @@ var _sounds: Dictionary = {
|
|||||||
"item_pickup": preload("res://assets/audio/sfx/item_pickup.wav"),
|
"item_pickup": preload("res://assets/audio/sfx/item_pickup.wav"),
|
||||||
"ui_click": preload("res://assets/audio/sfx/ui_click.wav"),
|
"ui_click": preload("res://assets/audio/sfx/ui_click.wav"),
|
||||||
"ui_select": preload("res://assets/audio/sfx/ui_select.wav"),
|
"ui_select": preload("res://assets/audio/sfx/ui_select.wav"),
|
||||||
|
"door_close": preload("res://assets/audio/sfx/door_close.wav"),
|
||||||
|
"room_clear": preload("res://assets/audio/sfx/room_clear.wav"),
|
||||||
|
"teleport": preload("res://assets/audio/sfx/teleport.wav"),
|
||||||
}
|
}
|
||||||
|
|
||||||
var _pool: Array[AudioStreamPlayer] = []
|
var _pool: Array[AudioStreamPlayer] = []
|
||||||
|
|||||||
@@ -91,6 +91,7 @@ func take_damage(amount: float) -> void:
|
|||||||
_die()
|
_die()
|
||||||
|
|
||||||
func _die() -> void:
|
func _die() -> void:
|
||||||
|
AudioManager.play("enemy_death")
|
||||||
_spawn_drop()
|
_spawn_drop()
|
||||||
queue_free()
|
queue_free()
|
||||||
|
|
||||||
|
|||||||
@@ -863,6 +863,7 @@ func take_damage(amount: float) -> void:
|
|||||||
|
|
||||||
current_health -= amount
|
current_health -= amount
|
||||||
_flash_timer = 0.1
|
_flash_timer = 0.1
|
||||||
|
AudioManager.play("enemy_hit")
|
||||||
EventBus.boss_health_changed.emit(maxf(current_health, 0.0), max_health, "THE HIVEMIND")
|
EventBus.boss_health_changed.emit(maxf(current_health, 0.0), max_health, "THE HIVEMIND")
|
||||||
|
|
||||||
if current_health <= 0.0:
|
if current_health <= 0.0:
|
||||||
@@ -907,6 +908,7 @@ func _tick_climax(delta: float) -> void:
|
|||||||
|
|
||||||
|
|
||||||
func _die() -> void:
|
func _die() -> void:
|
||||||
|
AudioManager.play("enemy_death")
|
||||||
_clear_orbiters()
|
_clear_orbiters()
|
||||||
_end_beam()
|
_end_beam()
|
||||||
|
|
||||||
|
|||||||
@@ -369,6 +369,7 @@ func take_damage(amount: float) -> void:
|
|||||||
return
|
return
|
||||||
|
|
||||||
current_health -= amount
|
current_health -= amount
|
||||||
|
AudioManager.play("enemy_hit")
|
||||||
EventBus.boss_health_changed.emit(current_health, max_health, "THE RELAY")
|
EventBus.boss_health_changed.emit(current_health, max_health, "THE RELAY")
|
||||||
|
|
||||||
if current_health <= 5.0 and _phase != Phase.CLIMAX:
|
if current_health <= 5.0 and _phase != Phase.CLIMAX:
|
||||||
@@ -412,6 +413,7 @@ func _tick_climax(delta: float) -> void:
|
|||||||
_die()
|
_die()
|
||||||
|
|
||||||
func _die() -> void:
|
func _die() -> void:
|
||||||
|
AudioManager.play("enemy_death")
|
||||||
EventBus.boss_died.emit()
|
EventBus.boss_died.emit()
|
||||||
|
|
||||||
# Cleanup burst projectiles
|
# Cleanup burst projectiles
|
||||||
|
|||||||
@@ -86,6 +86,7 @@ func _do_fire(delta: float) -> void:
|
|||||||
_shot_timer = BURST_PAUSE
|
_shot_timer = BURST_PAUSE
|
||||||
|
|
||||||
func _fire_projectile() -> void:
|
func _fire_projectile() -> void:
|
||||||
|
AudioManager.play("enemy_shoot")
|
||||||
var proj = ENEMY_PROJECTILE.instantiate()
|
var proj = ENEMY_PROJECTILE.instantiate()
|
||||||
proj.position = (get_parent() as Node2D).to_local(global_position)
|
proj.position = (get_parent() as Node2D).to_local(global_position)
|
||||||
proj.direction = Vector2.from_angle(_fire_angle)
|
proj.direction = Vector2.from_angle(_fire_angle)
|
||||||
|
|||||||
@@ -370,12 +370,14 @@ func take_damage(amount: float) -> void:
|
|||||||
return # already dying
|
return # already dying
|
||||||
current_health -= amount
|
current_health -= amount
|
||||||
_flash_timer = 0.1
|
_flash_timer = 0.1
|
||||||
|
AudioManager.play("enemy_hit")
|
||||||
EventBus.boss_health_changed.emit(maxf(current_health, 0.0), max_health, "THE WARDEN")
|
EventBus.boss_health_changed.emit(maxf(current_health, 0.0), max_health, "THE WARDEN")
|
||||||
if current_health <= 0.0:
|
if current_health <= 0.0:
|
||||||
_enter_climax()
|
_enter_climax()
|
||||||
|
|
||||||
|
|
||||||
func _die() -> void:
|
func _die() -> void:
|
||||||
|
AudioManager.play("enemy_death")
|
||||||
_clear_mines()
|
_clear_mines()
|
||||||
for entry in _sweep_projs:
|
for entry in _sweep_projs:
|
||||||
if is_instance_valid(entry["node"]):
|
if is_instance_valid(entry["node"]):
|
||||||
|
|||||||
@@ -327,6 +327,7 @@ func _on_enemy_died() -> void:
|
|||||||
_enemy_count -= 1
|
_enemy_count -= 1
|
||||||
if _enemy_count <= 0:
|
if _enemy_count <= 0:
|
||||||
data.cleared = true
|
data.cleared = true
|
||||||
|
AudioManager.play("room_clear")
|
||||||
if data.type == RoomData.RoomType.BOSS:
|
if data.type == RoomData.RoomType.BOSS:
|
||||||
_spawn_body_part_drop()
|
_spawn_body_part_drop()
|
||||||
_spawn_floor_exit()
|
_spawn_floor_exit()
|
||||||
@@ -566,11 +567,18 @@ func _update_door_locks() -> void:
|
|||||||
(area as Area2D).monitoring = not locked
|
(area as Area2D).monitoring = not locked
|
||||||
|
|
||||||
# Update physical door barriers
|
# Update physical door barriers
|
||||||
|
var was_unlocked := false
|
||||||
|
for door in _physical_doors.values():
|
||||||
|
if not door.is_locked():
|
||||||
|
was_unlocked = true
|
||||||
|
break
|
||||||
for door in _physical_doors.values():
|
for door in _physical_doors.values():
|
||||||
if locked:
|
if locked:
|
||||||
door.lock()
|
door.lock()
|
||||||
else:
|
else:
|
||||||
door.unlock()
|
door.unlock()
|
||||||
|
if locked and was_unlocked:
|
||||||
|
AudioManager.play("door_close")
|
||||||
|
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
# Explicit signal cleanup on exit (safer than relying on Godot auto-cleanup)
|
# Explicit signal cleanup on exit (safer than relying on Godot auto-cleanup)
|
||||||
|
|||||||
Reference in New Issue
Block a user