Trait Entity

Source
pub trait Entity {
    // Required methods
    fn position(&self) -> Vect;
    fn velocity(&self) -> Vect;
}

Required Methods§

Source

fn position(&self) -> Vect

returns actual position of shooter or target

Source

fn velocity(&self) -> Vect

returns actual velocity of shooter or target in case of shooter you should provide Vect::ZERO if shooters speed does not affect the bullet, if yes then return the velocity you add to bullet

Implementors§