[−][src]Trait naia_server::Actor
An Actor is a container of Properties that can be scoped, tracked, and synced, with a remote host
Required methods
pub fn get_state_mask_size(&self) -> u8
[src]
Gets the number of bytes of the Actor's State Mask
pub fn get_typed_copy(&self) -> T
[src]
Gets a copy of the Actor, wrapped in an ActorType enum (which is the common protocol between the server/host)
pub fn get_type_id(&self) -> TypeId
[src]
Gets the TypeId of the Actor's implementation, used to map to a registered ActorType
pub fn write(&self, out_bytes: &mut Vec<u8, Global>)
[src]
Writes data into an outgoing byte stream, sufficient to completely recreate the Actor on the client
pub fn write_partial(
&self,
state_mask: &StateMask,
out_bytes: &mut Vec<u8, Global>
)
[src]
&self,
state_mask: &StateMask,
out_bytes: &mut Vec<u8, Global>
)
Write data into an outgoing byte stream, sufficient only to update the mutated Properties of the Actor on the client
pub fn read_full(&mut self, reader: &mut PacketReader<'_>, packet_index: u16)
[src]
Reads data from an incoming packet, sufficient to sync the in-memory Actor with it's state on the Server
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
)
Reads data from an incoming packet, sufficient to sync the in-memory Actor with it's state on the Server
pub fn set_mutator(&mut self, mutator: &Rc<RefCell<dyn ActorMutator + 'static>>)
[src]
Set the Actor's ActorMutator, which keeps track of which Properties have been mutated, necessary to sync only the Properties that have changed with the client
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