Add messages, with global lookup map
Add support for messages, along with a global lookup map and random choice of messages.
This commit is contained in:
parent
78a52142d1
commit
c643ee1dfc
10 changed files with 443 additions and 52 deletions
|
|
@ -66,6 +66,12 @@ impl BoundingBox {
|
|||
pub fn inner(self) -> BoundingBox {
|
||||
self + UNIT_POSITION - UNIT_DIMENSIONS - UNIT_DIMENSIONS
|
||||
}
|
||||
|
||||
/// Moves the top right corner of the bounding box by the offset specified
|
||||
/// by the given position, keeping the lower right corner in place
|
||||
pub fn move_tr_corner(self, offset: Position) -> BoundingBox {
|
||||
self + offset - Dimensions { w: offset.x as u16, h: offset.y as u16 }
|
||||
}
|
||||
}
|
||||
|
||||
impl ops::Add<Position> for BoundingBox {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue