[][src]Struct rust_action_heroes::component::position::Position

pub(crate) struct Position {
    pub(crate) x: i16,
    pub(crate) y: i16,
}

Position Component. Places an entity on the play grid.

The most complex component in terms of impls. We have some helper methods and we implement Add for ergonomics in a few systems.

Fields

x: i16y: i16

Implementations

impl Position[src]

pub(crate) fn new(x: i16, y: i16) -> Self[src]

pub(crate) fn set_pos(&mut self, Position { x: x, y: y }: Position)[src]

pub(crate) fn as_tuple(&self) -> (i16, i16)[src]

Trait Implementations

impl Add<Position> for Position[src]

type Output = Self

The resulting type after applying the + operator.

impl Clone for Position[src]

impl Component for Position[src]

type Storage = DenseVecStorage<Self>

Associated storage type for this component.

impl Copy for Position[src]

impl Debug for Position[src]

impl Default for Position[src]

impl Eq for Position[src]

impl From<(i16, i16)> for Position[src]

impl Hash for Position[src]

impl PartialEq<Position> for Position[src]

impl StructuralEq for Position[src]

impl StructuralPartialEq for Position[src]

Auto Trait Implementations

impl RefUnwindSafe for Position

impl Send for Position

impl Sync for Position

impl Unpin for Position

impl UnwindSafe for Position

Blanket Implementations

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
    D: AdaptFrom<S, Swp, Dwp, T>,
    Dwp: WhitePoint,
    Swp: WhitePoint,
    T: Component + Float
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Any for T where
    T: Any

impl<T> AnyEq for T where
    T: PartialEq<T> + Any

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Clone for T where
    T: Clone
[src]

impl<T> Event for T where
    T: Send + Sync + 'static, 

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Resource for T where
    T: Any + Send + Sync

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Scalar for T where
    T: PartialEq<T> + Copy + Any + Debug
[src]

impl<T> SetParameter for T

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

impl<T> Supports<T> for T

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> TryDefault for T where
    T: Default

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,