EventConsumer

This commit is contained in:
Quaternions 2023-09-08 17:15:49 -07:00
parent f92207863b
commit 6b83568e8b
2 changed files with 9 additions and 0 deletions

View File

@ -263,3 +263,9 @@ impl crate::event::EventEmitter<PhysicsEvent> for PhysicsState {
best.event() best.event()
} }
} }
impl crate::event::EventConsumer<PhysicsEvent> for PhysicsState {
fn process_event(&mut self, event:EventStruct<PhysicsEvent>) {
//
}
}

View File

@ -6,6 +6,9 @@ pub struct EventStruct<E> {
pub trait EventEmitter<E> { pub trait EventEmitter<E> {
fn next_event(&self) -> Option<EventStruct<E>>; fn next_event(&self) -> Option<EventStruct<E>>;
} }
pub trait EventConsumer<E> {
fn process_event(&mut self, event:EventStruct<E>);
}
//PROPER PRIVATE FIELDS!!! //PROPER PRIVATE FIELDS!!!
pub struct EventCollector<E> { pub struct EventCollector<E> {