15 lines
401 B
Rust
15 lines
401 B
Rust
extern crate specs;
|
|
use specs::prelude::*;
|
|
use super::{Viewshed, Position};
|
|
|
|
pub struct VisibilitySystem {}
|
|
|
|
impl<'a> System<'a> for VisibilitySystem {
|
|
type SystemData = ( WriteStorage<'a, Viewshed>,
|
|
WriteStorage<'a, Position>);
|
|
|
|
fn run(&mut self, (mut viewshed, pos) : Self::SystemData) {
|
|
for (viewshed,pos) in (&mut viewshed, &pos).join() {
|
|
}
|
|
}
|
|
} |