Module position

Module position 

Source
Expand description

Position, layers, velocity, anchors, etc.

Structs§

PxPosition
The position of an entity
PxSubPosition
Float-based position. Add to entities that have PxPosition, but also need a sub-pixel position. Use PxPosition unless a sub-pixel position is necessary.
PxVelocity
Velocity. Entities with this and PxSubPosition will move at this velocity over time.

Enums§

PxAnchor
How a sprite is positioned relative to its PxPosition. It defaults to PxAnchor::Center.

Traits§

PxLayer
Trait implemented for your game’s custom layer type. Use the px_layer attribute or derive/implement the required traits manually. The layers will be rendered in the order defined by the PartialOrd implementation. So, lower values will be in the back and vice versa.