summaryrefslogtreecommitdiff
path: root/src/components.rs
blob: 07de1d5fec3639a06126cd6cb937d89c3c83b81e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26

use specs::{
	VecStorage,
	Component
};

use super::controls::Control;


#[derive(Component, Debug, Hash, PartialEq, Eq, Clone, Copy)]
#[storage(VecStorage)]
pub struct Position {
	pub x: i32,
	pub y: i32
}

#[derive(Component, Debug, Clone)]
#[storage(VecStorage)]
pub struct Visible {
    pub sprite: String,
    pub height: f32
}

#[derive(Component, Debug)]
#[storage(VecStorage)]
pub struct Controller(pub Control);