wuestite_ecs 0.1.0

2D game engine written in rust.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/// [Entity] is a unique identifier that can have [`Component`](crate::Component) attached to it.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct Entity(u64);

impl Entity {
    /// Creates a new [Entity] with the given unique identifier.
    pub fn new(id: u64) -> Self {
        Self(id)
    }

    /// Returns the unique identifier of the [Entity].
    pub fn id(&self) -> u64 {
        self.0
    }
}