Add Repentance placeholder VFX — server broadcast + client effect
Server: - Add RepentancePlaceholderVisualPush DTO to GameMessages.cs - Add BroadcastToAllViewersAsync helper on GameHandlerBase - GamePlayCardHandler emits game.visual.repentance_placeholder to all players and spectators after a Repentance card resolves; sets hasCustomAnimation based on ability Animation.AssetUrl presence Client: - Add repentance_placeholder_visual signal and push-router case in Game.gd - New RepentancePlaceholderFx component: resolves source/target world positions, picks affinity + player team colors, tweens a glowing orb projectile to target and plays a torus ring + burst-mote impact - Wire component in game_screen.gd (_ready, _exit_tree, signal handler) 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:
@@ -33,20 +33,21 @@ extends Node3D
|
||||
|
||||
# ── Code-only component vars ──────────────────────────────────────────────────
|
||||
|
||||
var _board_ctrl : BoardController = null
|
||||
var _cam_ctrl : CameraController = null
|
||||
var _pathfinder : Pathfinder = null
|
||||
var _unit_reg : UnitRegistry = null
|
||||
var _tile_resolver : TileTargetResolver = null
|
||||
var _mesh_builder : UnitMeshBuilder = null
|
||||
var _animator : UnitAnimator = null
|
||||
var _input_handler : BoardInputHandler = null
|
||||
var _tile_drawer : TileDrawer = null
|
||||
var _skybox : SkyboxController = null
|
||||
var _inactive_dlgs : InactiveDialogs = null
|
||||
var _sel_ctrl : SelectionController = null
|
||||
var _abt : AbilityTargeting = null
|
||||
var _prompt_handler: ServerPromptHandler = null
|
||||
var _board_ctrl : BoardController = null
|
||||
var _cam_ctrl : CameraController = null
|
||||
var _pathfinder : Pathfinder = null
|
||||
var _unit_reg : UnitRegistry = null
|
||||
var _tile_resolver : TileTargetResolver = null
|
||||
var _mesh_builder : UnitMeshBuilder = null
|
||||
var _animator : UnitAnimator = null
|
||||
var _input_handler : BoardInputHandler = null
|
||||
var _tile_drawer : TileDrawer = null
|
||||
var _skybox : SkyboxController = null
|
||||
var _inactive_dlgs : InactiveDialogs = null
|
||||
var _sel_ctrl : SelectionController = null
|
||||
var _abt : AbilityTargeting = null
|
||||
var _prompt_handler: ServerPromptHandler = null
|
||||
var _repentance_fx : RepentancePlaceholderFx = null
|
||||
|
||||
# ── @onready node refs ────────────────────────────────────────────────────────
|
||||
|
||||
@@ -233,6 +234,13 @@ func _ready() -> void:
|
||||
_prompt_handler.highlight_add_requested.connect(_add_highlight)
|
||||
_prompt_handler.highlights_cleared.connect(_clear_highlights)
|
||||
|
||||
# RepentancePlaceholderFx
|
||||
_repentance_fx = RepentancePlaceholderFx.new()
|
||||
_repentance_fx.pathfinder = _pathfinder
|
||||
_repentance_fx.unit_bodies = _mesh_builder.unit_bodies
|
||||
_repentance_fx.units_root = _units_root
|
||||
add_child(_repentance_fx)
|
||||
|
||||
# BoardInputHandler
|
||||
_input_handler = BoardInputHandler.new()
|
||||
_input_handler.hold_timer = _hold_timer
|
||||
@@ -301,6 +309,7 @@ func _ready() -> void:
|
||||
Game.tile_pick_request.connect(_prompt_handler.on_tile_pick_request)
|
||||
Game.player_pick_request.connect(_prompt_handler.on_player_pick_request)
|
||||
Game.reveal_choice_pick_request.connect(_prompt_handler.on_reveal_choice_pick_request)
|
||||
Game.repentance_placeholder_visual.connect(_on_repentance_placeholder_visual)
|
||||
|
||||
# ── 6. Camera, skybox, hover, chat ───────────────────────────────────────
|
||||
_cam_ctrl.sync_cam_ctrl_panel()
|
||||
@@ -373,6 +382,8 @@ func _exit_tree() -> void:
|
||||
Game.player_pick_request.disconnect(_prompt_handler.on_player_pick_request)
|
||||
if Game.reveal_choice_pick_request.is_connected(_prompt_handler.on_reveal_choice_pick_request):
|
||||
Game.reveal_choice_pick_request.disconnect(_prompt_handler.on_reveal_choice_pick_request)
|
||||
if Game.repentance_placeholder_visual.is_connected(_on_repentance_placeholder_visual):
|
||||
Game.repentance_placeholder_visual.disconnect(_on_repentance_placeholder_visual)
|
||||
_skybox.clear_stars()
|
||||
_reset_unit_hover_glow()
|
||||
Chat.set_bubble_host(null)
|
||||
@@ -1117,6 +1128,11 @@ func _dict_get_any(dict: Dictionary, keys: Array, fallback: Variant = null) -> V
|
||||
return fallback
|
||||
|
||||
|
||||
func _on_repentance_placeholder_visual(payload: Dictionary) -> void:
|
||||
if _repentance_fx != null:
|
||||
_repentance_fx.play(payload)
|
||||
|
||||
|
||||
func _place_highlight_quad(quad: MeshInstance3D, x: int, y: int,
|
||||
col: Color, texture: Texture2D = null) -> void:
|
||||
var tile_top: float = _board_ctrl.tile_visual_tops.get(
|
||||
|
||||
Reference in New Issue
Block a user