Struct catchit::Object [] [src]

pub struct Object {
    pub pos: Position,
    pub half_size: Pt,
    pub shape: CollisionShape,
}

A game object which knows a few things about itself

Fields

pos
half_size
shape

Methods

impl Object

fn left(&self) -> Scalar

fn right(&self) -> Scalar

fn top(&self) -> Scalar

fn bottom(&self) -> Scalar

fn intersects(&self, other: &Object) -> bool

Returns true if both objects intersect

Trait Implementations

Derived Implementations

impl PartialEq for Object

fn eq(&self, __arg_0: &Object) -> bool

fn ne(&self, __arg_0: &Object) -> bool

impl Clone for Object

fn clone(&self) -> Object

1.0.0fn clone_from(&mut self, source: &Self)

impl Debug for Object

fn fmt(&self, __arg_0: &mut Formatter) -> Result