diff --git a/src/game/items.rs b/src/game/items.rs index 3c8103f..4a4b952 100644 --- a/src/game/items.rs +++ b/src/game/items.rs @@ -4,7 +4,7 @@ use std::fmt::Formatter; use crate::game::TextureId; use crate::mouse::MouseInteractive; -use crate::positioning::{Coords}; +use crate::positioning::Coords; use super::combat::Hero; use super::item_info_system::MouseOverItemInfo; diff --git a/src/game/sim/dungeon_sim.rs b/src/game/sim/dungeon_sim.rs index 4ab65b9..0a02c1f 100644 --- a/src/game/sim/dungeon_sim.rs +++ b/src/game/sim/dungeon_sim.rs @@ -267,7 +267,8 @@ pub fn manage_continue_prompt( cmd.entity(e).despawn_recursive(); } } else if !state.running && state.combat_state != CombatState::HeroDead { - if let Ok(_) = q.get_single() {} else { + if let Ok(_) = q.get_single() { + } else { spawn_prompt(cmd, assets); } } @@ -289,24 +290,24 @@ pub fn spawn_prompt(mut cmd: Commands, assets: Res) { color: Color::NONE.into(), ..default() }) - .with_children(|parent| { - // text - parent.spawn_bundle( - TextBundle::from_section( - "Press SPACE to continue exploring!", - TextStyle { - font: assets.font(&FontId::FiraSansBold), - font_size: 32.0, - color: Color::WHITE, - }, - ) - .with_style(Style { - margin: UiRect::all(Val::Px(5.0)), - align_self: AlignSelf::Center, - ..default() - }), - ); - }) - .insert(ContinuePrompt) - .insert(CleanupOnGameplayEnd); + .with_children(|parent| { + // text + parent.spawn_bundle( + TextBundle::from_section( + "Press SPACE to continue exploring!", + TextStyle { + font: assets.font(&FontId::FiraSansBold), + font_size: 32.0, + color: Color::WHITE, + }, + ) + .with_style(Style { + margin: UiRect::all(Val::Px(5.0)), + align_self: AlignSelf::Center, + ..default() + }), + ); + }) + .insert(ContinuePrompt) + .insert(CleanupOnGameplayEnd); } diff --git a/src/game/state.rs b/src/game/state.rs index f788182..1da9a1d 100644 --- a/src/game/state.rs +++ b/src/game/state.rs @@ -129,8 +129,8 @@ pub fn eye_tracking_system( let white_pos = white.translation.truncate(); let new_iris_trans = white.translation + ((mouse.position - white_pos) / 100.0) - .clamp_length(0.0, 0.2) - .extend(1.0); + .clamp_length(0.0, 0.2) + .extend(1.0); iris.translation = new_iris_trans; } } @@ -184,26 +184,26 @@ pub fn create_debug_items(mut spawn: EventWriter, items_db: Res< item.1, Coords::new(Pos::new(5, 0), item.0), )); - item = items_db.try_get_item(ItemId::ShieldRusty).unwrap(); - spawn.send(SpawnItemEvent::without_anim( - item.1, - Coords::new(Pos::new(6, 0), item.0), - )); - item = items_db.try_get_item(ItemId::Shield).unwrap(); - spawn.send(SpawnItemEvent::without_anim( - item.1, - Coords::new(Pos::new(0, 2), item.0), - )); - item = items_db.try_get_item(ItemId::ArmorRusty).unwrap(); - spawn.send(SpawnItemEvent::without_anim( - item.1, - Coords::new(Pos::new(2, 2), item.0), - )); - item = items_db.try_get_item(ItemId::ArmorRusty).unwrap(); - spawn.send(SpawnItemEvent::without_anim( - item.1, - Coords::new(Pos::new(4, 2), item.0), - )); + //item = items_db.try_get_item(ItemId::ShieldRusty).unwrap(); + //spawn.send(SpawnItemEvent::without_anim( + // item.1, + // Coords::new(Pos::new(6, 0), item.0), + //)); + //item = items_db.try_get_item(ItemId::Shield).unwrap(); + //spawn.send(SpawnItemEvent::without_anim( + // item.1, + // Coords::new(Pos::new(0, 2), item.0), + //)); + //item = items_db.try_get_item(ItemId::ArmorRusty).unwrap(); + //spawn.send(SpawnItemEvent::without_anim( + // item.1, + // Coords::new(Pos::new(2, 2), item.0), + //)); + //item = items_db.try_get_item(ItemId::ArmorRusty).unwrap(); + //spawn.send(SpawnItemEvent::without_anim( + // item.1, + // Coords::new(Pos::new(4, 2), item.0), + //)); } fn test_slice(