labyrinth
This commit is contained in:
parent
da36acbade
commit
cb97acba42
@ -11,8 +11,8 @@ mod prelude {
|
||||
pub use legion::systems::CommandBuffer;
|
||||
pub use legion::world::SubWorld;
|
||||
pub use legion::*;
|
||||
pub const SCREEN_WIDTH: i32 = 60;
|
||||
pub const SCREEN_HEIGHT: i32 = 40;
|
||||
pub const SCREEN_WIDTH: i32 = 80;
|
||||
pub const SCREEN_HEIGHT: i32 = 50;
|
||||
pub const DISPLAY_WIDTH: i32 = SCREEN_WIDTH / 2;
|
||||
pub const DISPLAY_HEIGHT: i32 = SCREEN_HEIGHT / 2;
|
||||
pub use crate::camera::*;
|
||||
|
@ -2,17 +2,17 @@ use crate::prelude::*;
|
||||
|
||||
const FORTRESS: (&str, i32, i32) = (
|
||||
"
|
||||
------------
|
||||
---######---
|
||||
---#----#---
|
||||
---#-M--#---
|
||||
-###----###-
|
||||
--M---------
|
||||
-###----###-
|
||||
---#----#---
|
||||
---#----#---
|
||||
---######---
|
||||
------------
|
||||
#-##########
|
||||
#-#--------#
|
||||
#-#-######-#
|
||||
#-#-#MMMM#-#
|
||||
#-#-#MMMM#-#
|
||||
#-#-#----#-#
|
||||
#-#-####-#-#
|
||||
#-#------#-#
|
||||
#-########-#
|
||||
#----------#
|
||||
############
|
||||
",
|
||||
12,
|
||||
11,
|
||||
|
@ -52,7 +52,6 @@ pub fn player_input(
|
||||
.unwrap();
|
||||
let mut enemies = <(Entity, &Point)>::query().filter(component::<Enemy>());
|
||||
|
||||
let mut did_something = false;
|
||||
if delta.x != 0 || delta.y != 0 {
|
||||
let mut hit_something = false;
|
||||
enemies
|
||||
@ -60,7 +59,6 @@ pub fn player_input(
|
||||
.filter(|(_, pos)| **pos == destination)
|
||||
.for_each(|(entity, _)| {
|
||||
hit_something = true;
|
||||
did_something = true;
|
||||
|
||||
commands.push((
|
||||
(),
|
||||
@ -72,7 +70,6 @@ pub fn player_input(
|
||||
});
|
||||
|
||||
if !hit_something {
|
||||
did_something = true;
|
||||
commands.push((
|
||||
(),
|
||||
WantsToMove {
|
||||
|
Loading…
Reference in New Issue
Block a user