Async Entity Component System based on the ideas of specs (https://github.com/amethyst/specs)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 regels
499 B

  1. use hibitset::{BitSet, BitSetNot};
  2. use crate::{
  3. access::{Join, ParJoin},
  4. entity::Index,
  5. };
  6. use super::DistinctStorage;
  7. pub struct AntiStorage<'a>(pub &'a BitSet);
  8. impl<'a> DistinctStorage for AntiStorage<'a> {}
  9. impl<'a> Join for AntiStorage<'a> {
  10. type Mask = BitSetNot<&'a BitSet>;
  11. type Type = ();
  12. type Value = ();
  13. fn open(self) -> (Self::Mask, ()) {
  14. (BitSetNot(self.0), ())
  15. }
  16. fn get(_: &mut (), _: Index) {}
  17. }
  18. impl<'a> ParJoin for AntiStorage<'a> {}