RealtimeComponent

Trait RealtimeComponent 

Source
pub trait RealtimeComponent {
    type Event;

    // Required method
    fn tick(&mut self) -> (Self::Event, Duration);
}
Expand description

A component of an entity which can produce realtime events

Required Associated Types§

Source

type Event

Events that will be periodically emited by this component

Required Methods§

Source

fn tick(&mut self) -> (Self::Event, Duration)

Generate an event, along with the time until the next tick should take place

Implementors§