35 lines
522 B
Rust
35 lines
522 B
Rust
use rltk::{Point, RGB};
|
|
|
|
use specs::prelude::*;
|
|
|
|
#[derive(Component)]
|
|
pub struct Position {
|
|
pub x: i32,
|
|
pub y: i32,
|
|
}
|
|
|
|
#[derive(Component)]
|
|
pub struct Renderable {
|
|
pub glyph: u16,
|
|
pub fg: RGB,
|
|
pub bg: RGB,
|
|
}
|
|
|
|
#[derive(Component, Debug)]
|
|
pub struct Player {}
|
|
|
|
#[derive(Component)]
|
|
pub struct Viewshed {
|
|
pub visible_tiles: Vec<Point>,
|
|
pub range: i32,
|
|
pub dirty: bool,
|
|
}
|
|
|
|
#[derive(Component, Debug)]
|
|
pub struct Monster {}
|
|
|
|
|
|
#[derive(Component, Debug)]
|
|
pub struct Name {
|
|
pub name : String
|
|
} |