Feature: client SFX playback for unit animations

- SFX.gd autoload: fire-and-forget CDN audio player with 8-slot pool,
  session-level stream cache, OGG/MP3 support via HTTPRequest download,
  uses Settings BUS_SFX so volume/mute work automatically
- Register SFX in project.godot autoloads
- game_screen.gd:
  - _sfx_for_unit(iid, key) helper — looks up CardDefinition SFX URL
    from ContentCache using the unit's def ID
  - Attack sound: played when player initiates attack + counter-attack
  - Damaged sound: played at all damage animation sites (immediate,
    delayed bystander, post-attack callback, counter-chain)
  - Death sound: played when dying animation fires
  - Move sound: played when movement animation starts

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
This commit is contained in:
dingo
2026-03-17 13:30:39 -04:00
co-authored by Claude Happy
parent c105120dc6
commit ea3293e9c5
3 changed files with 108 additions and 2 deletions
+1
View File
@@ -26,6 +26,7 @@ Settings="*res://autoloads/Settings.gd"
Game="*res://autoloads/Game.gd"
ModelCache="*res://autoloads/ModelCache.gd"
Music="*res://autoloads/Music.gd"
SFX="*res://autoloads/SFX.gd"
[display]