separate scope differently in the macro

This commit is contained in:
Timothy Warren 2021-11-04 11:38:13 -04:00
parent 7070fb0357
commit 923e0dc42b

View File

@ -31,7 +31,7 @@ use visibility_system::VisibilitySystem;
macro_rules! register {
// $gs is needed to get the scope at the usage point
// $Type is the Component type that is being registered
($gs: ident, $( $Type: ty ),*,) => {
($gs: ident <- $( $Type: ty ),*,) => {
$(
$gs.ecs.register::<$Type>();
)*
@ -195,7 +195,7 @@ fn main() -> rltk::BError {
let mut gs = State { ecs: World::new() };
register!(
gs,
gs <-
Position,
Renderable,
Player,