--- name: bevy-genre-horror description: "Bevy 0.20 horror router: sanity, stalker suspicion, and light energy as ECS data, with lighting, audio, and navigation in the linked skills. Use when routing a horror game. Keywords: Bevy, Horror, sanity, stalker, ECS, router." --- # Bevy Horror (thin router) Genre router. Domain work lives in the Bevy skills below. ## When to use Load this for sanity or detection as your components, plus lighting and audio. ## ECS shape - **Components** hold the genre's per-entity flags as plain data. This file does not name new engine types. - **Resources** hold run-wide counters (score, wave index, seed) via bevy-data-resources. - **Systems** read those components on `Update` or the fixed timestep from bevy-master. Order them with `.chain()` when a later system must see the result. - **Schedule:** gameplay mode changes go through bevy-state-machines. This file registers only the sanity, suspicion, and light systems. ## Routing - [bevy-3d-lighting](https://github.com/thedivergentai/Game-Dev-Agentic-Skills/blob/main/skills/bevy-3d-lighting/SKILL.md) - Darkness. - [bevy-audio-systems](https://github.com/thedivergentai/Game-Dev-Agentic-Skills/blob/main/skills/bevy-audio-systems/SKILL.md) - Stingers. - [bevy-ai-navigation](https://github.com/thedivergentai/Game-Dev-Agentic-Skills/blob/main/skills/bevy-ai-navigation/SKILL.md) - Stalker policy. - [bevy-mechanic-secrets](https://github.com/thedivergentai/Game-Dev-Agentic-Skills/blob/main/skills/bevy-mechanic-secrets/SKILL.md) - Lore flags. ## Scope Sanity, suspicion, and light energy live on components. Darkness, stingers, and stalker paths stay in the skills linked above. | Call | Owner here | Leave to the linked skill | | --- | --- | --- | | Fear falls while the player is vulnerable | `Sanity` on `FixedUpdate` | A light or audio crate | | The stalker has line of sight | `Stalker.sees_player` and `suspicion` | Pathfinding in bevy-ai-navigation | | A held light spends energy | `LightCell.energy` | Spotlights in bevy-3d-lighting | ```toml [dependencies] bevy = "0.20" ``` ```rust #[derive(Component)] #[require(Transform)] struct Sanity { value: f32, } #[derive(Resource)] struct SanityDrain(f32); fn drain_sanity(time: Res