2020-07-27 09:59:14 -04:00
|
|
|
#[derive(Debug)]
|
|
|
|
pub enum Event {
|
|
|
|
// Fired when the player hits an obstacle like a wall
|
2020-07-27 16:21:19 -04:00
|
|
|
PlayerHitObstacle,
|
2020-07-27 09:59:14 -04:00
|
|
|
|
|
|
|
// Fired when an entity is moved
|
|
|
|
EntityMoved(EntityMoved),
|
|
|
|
|
|
|
|
// Fired when the box is placed on a spot
|
|
|
|
BoxPlacedOnSpot(BoxPlacedOnSpot),
|
|
|
|
}
|
|
|
|
|
|
|
|
pub type EntityId = u32;
|
|
|
|
|
|
|
|
#[derive(Debug)]
|
|
|
|
pub struct EntityMoved {
|
|
|
|
pub id: EntityId,
|
|
|
|
}
|
|
|
|
|
|
|
|
#[derive(Debug)]
|
|
|
|
pub struct BoxPlacedOnSpot {
|
|
|
|
pub is_correct_spot: bool,
|
|
|
|
}
|