feat(rendering): GameplayRenderer base class — occlusion for all renderers (D-170)

New GameplayRenderer extends Node2D with built-in occlusion support.
Subclasses override _gameplay_process() and _gameplay_draw() instead
of _process() and _draw() — these are skipped when a fullscreen
implant app covers gameplay.

Migrated all 5 gameplay renderers:
- CursorRenderer: hover detection + bracket drawing paused
- EntityRenderer: position lerping paused
- FogEntities: fog dot rendering paused
- SoundIndicatorRenderer: directional arrows paused
- WorldRenderer: tile/fog/entity updates paused

No more manual occlusion wiring — the base class handles everything.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-05 11:51:30 +02:00
co-authored by Claude Opus 4.6
parent a01f7c9cfb
commit 34a21d4cd0
6 changed files with 70 additions and 23 deletions
+3 -3
View File
@@ -1,5 +1,5 @@
class_name EntityRenderer
extends Node2D
extends GameplayRenderer
# Entity renderer — manages entity sprites under the Entities node
# Creates/updates/removes Sprite2D children based on entity data
@@ -35,11 +35,11 @@ var _entity_tweens: Dictionary = {} # #521: entity_id -> {from: Color, target:
var _entity_facing: Dictionary = {} # #540: entity_id -> String ("north"/"east"/"south"/"west")
func _ready() -> void:
func _renderer_ready() -> void:
print("EntityRenderer: Initialized")
func _process(delta: float) -> void:
func _gameplay_process(delta: float) -> void:
# Lerp all entity visual positions toward their targets each frame.
# Uses framerate-independent exponential smoothing.
var weight := 1.0 - exp(-LERP_SPEED * delta)