Skip to content

Addendum to Rusty Roguelike Bevy

Saverio Miroddi edited this page May 16, 2022 · 1 revision

Points to be explained:

  • Skipped and Merged steps
  • Difference in querying entities having components between Legion and Bevy (e.g. let base_damage)

Linguistic improvements:

  • PointC destructuring
  • State machine via const generics
  • .find_map(|blah| (blah == 1).then(|| item_entity))
  • Create Hashset from iterable: HashSet::from(["Einar", "Olaf", "Harald"])
  • Add entires to an array via: available_entities.extend(vec![t; t.frequency as usize]);
Clone this wiki locally