components.rs 466 B

12345678910111213141516171819202122232425262728
  1. extern crate specs;
  2. use specs::prelude::*;
  3. extern crate specs_derive;
  4. extern crate rltk;
  5. use rltk::{RGB};
  6. #[derive(Component)]
  7. pub struct Position {
  8. pub x: i32,
  9. pub y: i32,
  10. }
  11. #[derive(Component)]
  12. pub struct Renderable {
  13. pub glyph: u8,
  14. pub fg: RGB,
  15. pub bg: RGB,
  16. }
  17. #[derive(Component, Debug)]
  18. pub struct Player {}
  19. #[derive(Component)]
  20. pub struct Viewshed {
  21. pub visible_tiles : Vec<rltk::Point>,
  22. pub range : i32,
  23. pub dirty : bool
  24. }