Compare commits
3 commits
fbc416796e
...
ca5ebf22d5
Author | SHA1 | Date | |
---|---|---|---|
yuni | ca5ebf22d5 | ||
yuni | 2876266008 | ||
yuni | 3e8d4bf6d7 |
|
@ -135,7 +135,32 @@ A variety of relatively simple game systems should interact with each other to c
|
|||
|
||||
# Inspiration
|
||||
|
||||
TODO
|
||||
- Outer Wilds (not Outer Worlds)
|
||||
- Kerbal Space Program
|
||||
- Fallout New Vegas
|
||||
- Anathem
|
||||
- Baldur's Gate 3
|
||||
- Citizen Sleeper
|
||||
- Delta V: Rings of Saturn
|
||||
- Disco Elysium
|
||||
- Elite: Dangerous
|
||||
- Endless Sky
|
||||
- Firefly (2002 series)
|
||||
- Mass Effect
|
||||
- Nethack
|
||||
- Planescape: Torment
|
||||
- Prey (2017 game)
|
||||
- Project Hail Mary
|
||||
- RimWorld
|
||||
- Risk of Rain
|
||||
- Robot and Monk series
|
||||
- Shadowrun Returns: Dragonfall, Hong Kong
|
||||
- Stardew Valley
|
||||
- Stray (2022 game)
|
||||
- System Shock 2
|
||||
- The Expanse
|
||||
- The Forgotten City
|
||||
- The Red Strings Club
|
||||
|
||||
# Survival Mechanics
|
||||
|
||||
|
|
|
@ -128,6 +128,7 @@ pub fn setup(
|
|||
|
||||
pub fn spawn_effects(
|
||||
mut commands: Commands,
|
||||
settings: Res<var::Settings>,
|
||||
mut er_effect: EventReader<SpawnEffectEvent>,
|
||||
mut materials: ResMut<Assets<StandardMaterial>>,
|
||||
mut meshes: ResMut<Assets<Mesh>>,
|
||||
|
@ -173,6 +174,7 @@ pub fn spawn_effects(
|
|||
let texture = asset_server.load("textures/exhaust.png");
|
||||
commands.spawn((
|
||||
IsEffect,
|
||||
hud::ToggleableHudElement,
|
||||
RigidBody::Kinematic,
|
||||
bevy::pbr::NotShadowCaster,
|
||||
pos,
|
||||
|
@ -205,6 +207,11 @@ pub fn spawn_effects(
|
|||
alpha_mode: AlphaMode::Blend,
|
||||
..Default::default()
|
||||
}),
|
||||
visibility: if settings.hud_active {
|
||||
Visibility::Inherited
|
||||
} else {
|
||||
Visibility::Hidden
|
||||
},
|
||||
..default()
|
||||
},
|
||||
));
|
||||
|
@ -258,11 +265,9 @@ pub fn update_fade_material(
|
|||
if now > end_time {
|
||||
material.base_color.set_alpha(data.value_end);
|
||||
commands.entity(entity).remove::<FadeMaterial>();
|
||||
}
|
||||
else if now < data.start_time {
|
||||
} else if now < data.start_time {
|
||||
material.base_color.set_alpha(data.value_start);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
let progress = ((now - data.start_time) / data.duration) as f32;
|
||||
let value = data.value_start + progress * (data.value_end - data.value_start);
|
||||
material.base_color.set_alpha(value);
|
||||
|
@ -281,11 +286,9 @@ pub fn update_grow(
|
|||
if now > end_time {
|
||||
trans.scale = Vec3::splat(data.scale_end);
|
||||
commands.entity(entity).remove::<Grow3DObject>();
|
||||
}
|
||||
else if now < data.start_time {
|
||||
} else if now < data.start_time {
|
||||
trans.scale = Vec3::splat(data.scale_start);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
let progress = ((now - data.start_time) / data.duration) as f32;
|
||||
let scale = data.scale_start + progress * (data.scale_end - data.scale_start);
|
||||
trans.scale = Vec3::splat(scale);
|
||||
|
|
|
@ -38,7 +38,10 @@ impl Plugin for WorldPlugin {
|
|||
fn build(&self, app: &mut App) {
|
||||
app.add_systems(Startup, setup);
|
||||
app.add_systems(Update, handle_respawn.run_if(on_event::<RespawnEvent>()));
|
||||
app.add_systems(Update, handle_despawn_at.run_if(any_with_component::<DespawnAt>));
|
||||
app.add_systems(
|
||||
Update,
|
||||
handle_despawn_at.run_if(any_with_component::<DespawnAt>),
|
||||
);
|
||||
app.add_plugins(PhysicsPlugins::default());
|
||||
//app.add_plugins(PhysicsDebugPlugin::default());
|
||||
app.insert_resource(Gravity(DVec3::splat(0.0)));
|
||||
|
|
Loading…
Reference in a new issue