Trait naia_server::ActorType [−][src]
pub trait ActorType<Impl = Self>: Clone { pub fn read_full(
&mut self,
reader: &mut PacketReader<'_>,
packet_index: u16
); pub fn read_partial(
&mut self,
state_mask: &StateMask,
reader: &mut PacketReader<'_>,
packet_index: u16
); pub fn inner_ref(&self) -> Rc<RefCell<dyn Actor<Impl> + 'static>>; pub fn equals(&self, other: &Impl) -> bool; pub fn equals_prediction(&self, other: &Impl) -> bool; pub fn set_to_interpolation(
&mut self,
old: &Impl,
new: &Impl,
fraction: f32
); pub fn mirror(&mut self, other: &Impl); pub fn is_interpolated(&self) -> bool; pub fn is_predicted(&self) -> bool; }
An Enum with a variant for every Actor that can be synced between Client/Host
Required methods
pub fn read_full(&mut self, reader: &mut PacketReader<'_>, packet_index: u16)[src]
Read bytes from an incoming packet into all contained Properties
pub fn read_partial(
&mut self,
state_mask: &StateMask,
reader: &mut PacketReader<'_>,
packet_index: u16
)[src]
&mut self,
state_mask: &StateMask,
reader: &mut PacketReader<'_>,
packet_index: u16
)
Read bytes from an incoming packet, updating the Properties which have been mutated on the Server
pub fn inner_ref(&self) -> Rc<RefCell<dyn Actor<Impl> + 'static>>[src]
Convert ActorType to an inner reference to the Actor
pub fn equals(&self, other: &Impl) -> bool[src]
Compare properties in another ActorType
pub fn equals_prediction(&self, other: &Impl) -> bool[src]
Compare predicted properties in another ActorType
pub fn set_to_interpolation(&mut self, old: &Impl, new: &Impl, fraction: f32)[src]
Sets the current Actor to an interpolated state between two other Actors of the same type
pub fn mirror(&mut self, other: &Impl)[src]
Sets the current Actor to an interpolated state between itself and another Actor of the same type
pub fn is_interpolated(&self) -> bool[src]
Returns whether or not the Actor has any interpolated properties
pub fn is_predicted(&self) -> bool[src]
Returns whether or not the Actor has any predicted properties