pub struct ActorData<Type> {
pub id: i32,
pub state: u32,
pub damage: i32,
pub collision_filter: u8,
pub resolves_collisions: bool,
pub rect: Rect,
pub bounding_box: Option<BoundingBox>,
pub actor_type: Type,
}Expand description
The data contained in an actor
Fields§
§id: i32The id of the actor given by the actor manager
state: u32The current state of the actor as a number
damage: i32The damage that the actor has taken so far
collision_filter: u8A byte that contains the sides that other actors can collide into
resolves_collisions: boolIf true, on collision the actor would be moved away from the collision
rect: RectThe sprite rectangle
bounding_box: Option<BoundingBox>The current bounding box for the actor
actor_type: TypeThe type of the actor
Trait Implementations§
impl<Type> StructuralPartialEq for ActorData<Type>
Auto Trait Implementations§
impl<Type> Freeze for ActorData<Type>where
Type: Freeze,
impl<Type> RefUnwindSafe for ActorData<Type>where
Type: RefUnwindSafe,
impl<Type> Send for ActorData<Type>where
Type: Send,
impl<Type> Sync for ActorData<Type>where
Type: Sync,
impl<Type> Unpin for ActorData<Type>where
Type: Unpin,
impl<Type> UnwindSafe for ActorData<Type>where
Type: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more