Files
Project-M/Assets/_Project/Scripts/Client/Presentation/DynamicLightConfig.cs
T
kronic a335ca3f21 Feel: attack distinctness — per-kind telegraph colours, windup voices, spit light
Every enemy kind now has a unique read on the existing replicated
state (client-only, zero netcode):

- Telegraph COLOURS per EnemyTelegraph.Kind: grunt orange, charger
  crimson (boss shares it - shapes already differ: cone/wedge/ring),
  spitter toxic-green lane, swarmer yellow. Shapes were already
  per-kind; they all rendered the same HDR red.
- Windup VOICES at the onset edge (the existing _prevWindup edge +
  strike-beep distance gate): grunt low thud, charger rising roar,
  spitter wet hiss, swarmer chitter - kinds read by EAR before the
  telegraph ramps.
- Projectile light colour by ownership in DynamicLightSystem: owned
  shots stay player-cyan, un-owned (Spitter spit) glows toxic green
  (EnemyProjectileColor knob).

Verified live: 12 s combat histogram shows zones rendering with
EnemyDanger_K0 (grunt) + EnemyDanger_K1 (charger) materials keyed to
real windups (screenshot); 466/466 EditMode; console clean. Remaining
distinctness depth (per-kind anim clips, creature locomotion) rides
the parallel Blender workstream.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-09 23:17:43 -07:00

54 lines
2.5 KiB
C#

using UnityEngine;
namespace ProjectM.Client
{
/// <summary>
/// Live-tunable knobs for <see cref="DynamicLightSystem"/> — the Phase 1.5 "dynamic-light-first" layer
/// (RoR2 trick: dark ambient + moving point lights carry the readability). Mirrors the
/// <see cref="WorldAtmosphereConfig"/> bridge idiom: a MonoBehaviour placed in the gameplay scene with a
/// static <see cref="Instance"/> the client presentation system reads (falling back to these same
/// defaults when absent). Pure presentation — never touches the simulation. Colours are sRGB.
/// </summary>
public sealed class DynamicLightConfig : MonoBehaviour
{
public static DynamicLightConfig Instance;
[Header("Master")]
public bool Enabled = true;
[Header("Projectile lights (pooled, follow every live projectile ghost)")]
[Min(0)] public int MaxProjectileLights = 24;
public Color ProjectileColor = new Color(0.45f, 0.85f, 1f, 1f);
[Tooltip("Un-owned (enemy) projectiles — Spitter spit reads toxic green vs the player's cyan.")]
public Color EnemyProjectileColor = new Color(0.55f, 1f, 0.35f, 1f);
[Min(0f)] public float ProjectileIntensity = 2.6f;
[Min(0.5f)] public float ProjectileRange = 7f;
[Header("Portal light (RoomExplore loot window — same position authority as the beacon)")]
public Color PortalColor = new Color(0.55f, 0.95f, 1f, 1f);
[Min(0f)] public float PortalIntensity = 3.5f;
[Min(0f)] public float PortalPulseAmp = 1.2f;
[Min(0.5f)] public float PortalRange = 13f;
[Header("Resource-node glow (soft pickup readability)")]
public bool NodeGlow = true;
[Min(0)] public int MaxNodeLights = 12;
public Color NodeColor = new Color(0.40f, 1f, 0.75f, 1f);
[Min(0f)] public float NodeIntensity = 1.3f;
[Min(0.5f)] public float NodeRange = 4.5f;
[Header("Impact flashes (fed by CombatFeedbackSystem's burst funnel)")]
[Min(0)] public int MaxFlashLights = 8;
public Color FlashDefaultColor = new Color(1f, 0.85f, 0.55f, 1f);
[Min(0f)] public float FlashIntensity = 3.2f;
[Min(0.5f)] public float FlashRange = 6.5f;
[Min(0.02f)] public float FlashDuration = 0.18f;
void OnEnable() { Instance = this; }
void OnDisable() { if (Instance == this) Instance = null; }
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)]
static void ResetStatics() { Instance = null; }
}
}