pub trait Component {
    fn as_any(&self) -> &dyn Any;
    fn as_mut_any(&mut self) -> &mut dyn Any;

    fn init(&mut self) { ... }
    fn update(&mut self, _delta_time: f32) { ... }
    fn get_quads(&self) -> Option<Vec<Quad>> { ... }
}
Expand description

The Component trait

Required Methods

Borrow the Component as a &mut dyn Any.

Borrow the Component as a &dyn Any.

Provided Methods

Initializes a Component.

Called once each frame.

The time between frames is also provided.

Get the Component’s drawable Quad.

Implementors