rpgx 0.1.3

Lightweight, modular, and extensible RPG game engine 2D, designed for flexibility, portability, and ease of use.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::prelude::{Coordinates, Delta, Shape};

pub trait Shaped {
    fn get_shape(&self) -> Shape;
}

pub trait Shiftable {
    /// Offsets the object by the given delta.
    fn offset(&mut self, delta: Delta);
    fn translate(&self, delta: Delta) -> Self;
}

pub trait Grid {
    fn contains(&self, coord: &Coordinates) -> bool;
}