bevy-genre-stealth
БесплатноБез исполняемых скриптовНе проверенThin Bevy genre router for Stealth. Keywords: Bevy, Stealth, genre, ECS, router.
от thedivergentai★ 1 019 звёзд на GitHubОб этом скилле
Bevy Stealth (thin router)
Genre router. Domain work lives in the Bevy skills below.
When to use
Load this for vision cones you author and alert states.
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
Updateor 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. Do not invent a genre plugin.
Coming from Godot
| Godot idea | Bevy idiom |
|---|---|
| Genre scene tree | Entities plus the domain skills linked below |
| Autoload director | A resource, not a singleton node |
| Signal bus for the loop | bevy-events-messaging |
Routing
- bevy-ai-navigation - Patrol.
- bevy-state-machines - Alert enum on the agent.
- bevy-3d-lighting - Readability of darkness.
- bevy-spatial-queries - Line of sight.
Scope
Vision cones, exposure, and alert meters are components you own. A ray that must stop on solid geometry belongs on bevy-spatial-queries. Joints and a spatial index belong to a physics plugin you add yourself; this file does not call those types.
Examples
[dependencies]
bevy = "0.20"
A guard samples the player's head, torso, and feet. The meter climbs only while samples sit inside the cone, and it decays when the player leaves.
#[derive(Component)]
struct Player;
#[derive(Component)]
struct Vision {
range: f32,
half_angle_cos: f32,
eye_offset: Vec3,
}
#[derive(Clone, Copy, PartialEq, Eq)]
enum AlertState {
Idle,
Suspicious,
Alerted,
}
#[derive(Component)]
struct Alert {
meter: f32,
state: AlertState,
}
fn in_cone(eye: Vec3, forward: Vec3, target: Vec3, vision: &Vision) -> bool {
let to = target - eye;
let dist = to.length();
if dist > vision.range || dist < 0.001 {
return false;
}
(to / dist).dot(forward) >= vision.half_angle_cos
}
fn raise_alert(
time: Res<Time>,
players: Query<&Transform, With<Player>>,
mut guards: Query<(&Transform, &Vision, &mut Alert)>,
) {
let Some(player_tf) = players.iter().next() else {
return;
};
let dt = time.delta_secs();
let samples = [
player_tf.translation + Vec3::Y * 1.6,
player_tf.translation + Vec3::Y * 0.9,
player_tf.translation + Vec3::Y * 0.2,
];
for (tf, vision, mut alert) in &mut guards {
let eye = tf.translation + vision.eye_offset;
let forward = tf.forward().as_vec3();
let hits = samples
.iter()
.filter(|point| in_cone(eye, forward, **point, vision))
.count();
let rate = hits as f32 / samples.len() as f32;
if rate > 0.0 {
alert.meter = (alert.meter + rate * 40.0 * dt).min(100.0);
} else {
alert.meter = (alert.meter - 15.0 * dt).max(0.0);
}
alert.state = if alert.meter >= 100.0 {
AlertState::Alerted
} else if alert.meter >= 25.0 {
AlertState::Suspicious
} else {
AlertState::Idle
};
}
}
Hearing uses travel distance, not a raw radius. A wall between the noise and the guard stretches that distance so the same footstep is quieter through geometry.
#[derive(Component)]
struct Hearing {
range: f32,
}
#[derive(Component)]
struct Noise {
loudness: f32,
}
#[derive(Component)]
struct Alert {
meter: f32,
}
fn hear(
time: Res<Time>,
noises: Query<(&Transform, &Noise)>,
mut guards: Query<(&Transform, &Hearing, &mut Alert)>,
) {
let dt = time.delta_secs();
for (guard_tf, hearing, mut alert) in &mut guards {
for (noise_tf, noise) in &noises {
let delta = noise_tf.translation - guard_tf.translation;
let straight = delta.length();
let blocked = delta.x.abs() > 2.0 && delta.z.abs() > 2.0;
let travel = if blocked { straight * 2.5 } else { straight };
if travel < hearing.range {
let gain = noise.loudness * (1.0 - travel / hearing.range);
alert.meter = (alert.meter + gain * dt).min(100.0);
}
}
}
}
pub struct HearingPlugin;
impl Plugin for HearingPlugin {
fn build(&self, app: &mut App) {
app.add_systems(Update, hear);
}
}
Light scales how fast the meter fills. A crouched player with low exposure fi
Установить bevy-genre-stealth в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл bevy-genre-stealth?
Thin Bevy genre router for Stealth. Keywords: Bevy, Stealth, genre, ECS, router.
Как установить скилл bevy-genre-stealth?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл bevy-genre-stealth запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic