2021-10-25 15:26:39 -04:00
|
|
|
use rltk::RGB;
|
2021-10-22 10:05:06 -04:00
|
|
|
use specs::prelude::*;
|
|
|
|
use specs_derive::*;
|
|
|
|
|
|
|
|
#[derive(Component)]
|
|
|
|
pub struct Position {
|
|
|
|
pub x: i32,
|
|
|
|
pub y: i32,
|
|
|
|
}
|
|
|
|
|
|
|
|
#[derive(Component)]
|
|
|
|
pub struct Renderable {
|
|
|
|
pub glyph: rltk::FontCharType,
|
|
|
|
pub fg: RGB,
|
|
|
|
pub bg: RGB,
|
|
|
|
}
|
|
|
|
|
|
|
|
#[derive(Component, Debug)]
|
|
|
|
pub struct Player {}
|
2021-10-25 15:26:39 -04:00
|
|
|
|
|
|
|
#[derive(Component)]
|
|
|
|
pub struct Viewshed {
|
|
|
|
pub visible_tiles: Vec<rltk::Point>,
|
|
|
|
pub range: i32,
|
2021-10-26 14:23:08 -04:00
|
|
|
pub dirty: bool,
|
2021-10-25 15:26:39 -04:00
|
|
|
}
|
2021-10-26 15:43:59 -04:00
|
|
|
|
|
|
|
#[derive(Component)]
|
|
|
|
pub struct Monster {}
|
|
|
|
|
|
|
|
#[derive(Component)]
|
|
|
|
pub struct Name {
|
|
|
|
pub name: String,
|
|
|
|
}
|