[][src]Trait naia_shared::ActorEq

pub trait ActorEq<T: ActorType, Impl = Self>: Actor<T> {
    fn equals(&self, other: &Impl) -> bool;
fn equals_prediction(&self, other: &Impl) -> bool;
fn set_to_interpolation(&mut self, old: &Impl, new: &Impl, fraction: f32);
fn mirror(&mut self, other: &Impl); }

Handles equality of Actors.. can't just derive PartialEq because we want to only compare Properties

Required methods

fn equals(&self, other: &Impl) -> bool

Compare properties in another Actor

fn equals_prediction(&self, other: &Impl) -> bool

Compare only predicted properties in another Actor

fn set_to_interpolation(&mut self, old: &Impl, new: &Impl, fraction: f32)

Sets the current Actor to an interpolated state between two other Actors of the same type

fn mirror(&mut self, other: &Impl)

Sets the current Actor to the state of another Actor of the same type

Loading content...

Implementors

Loading content...